Commit 58fed616 authored by Timo Koch's avatar Timo Koch
Browse files

[fluxvars] Remove deprecated constructors and methods in all fluxvariables

parent 4eaad59c
......@@ -81,31 +81,6 @@ class ElOnePTwoCFluxVariables: public ElasticFluxVariablesBase<TypeTag> ,
typedef typename FVElementGeometry::SubControlVolumeFace SCVFace;
public:
/*
* \brief The old constructor
*
* \param problem The problem
* \param element The finite element
* \param fvGeometry The finite-volume geometry in the fully implicit scheme
* \param fIdx The local index of the SCV (sub-control-volume) face
* \param elemVolVars The volume variables of the current element
* \param onBoundary A boolean variable to specify whether the flux variables
* are calculated for interior SCV faces or boundary faces, default=false
*/
DUNE_DEPRECATED_MSG("FluxVariables now have to be default constructed and updated.")
ElOnePTwoCFluxVariables(const Problem &problem,
const Element &element,
const FVElementGeometry &fvGeometry,
int fIdx,
const ElementVolumeVariables &elemVolVars,
const bool onBoundary = false) {}
/*!
* \brief Default constructor
* \note This can be removed when the deprecated constructor is removed.
*/
ElOnePTwoCFluxVariables() = default;
/*!
* \brief Compute / update the flux variables
*
......
......@@ -85,32 +85,6 @@ class ElTwoPFluxVariables: public ImplicitDarcyFluxVariables<TypeTag>
enum {numEq = GET_PROP_VALUE(TypeTag, NumEq)};
public:
/*
* \brief The old constructor
*
* \param problem The problem
* \param element The finite element
* \param fvGeometry The finite-volume geometry in the fully implicit scheme
* \param fIdx The local index of the SCV (sub-control-volume) face
* \param elemVolVars The volume variables of the current element
* \param onBoundary A boolean variable to specify whether the flux variables
* are calculated for interior SCV faces or boundary faces, default=false
*/
DUNE_DEPRECATED_MSG("FluxVariables now have to be default constructed and updated.")
ElTwoPFluxVariables(const Problem &problem,
const Element &element,
const FVElementGeometry &fvGeometry,
int fIdx,
const ElementVolumeVariables &elemVolVars,
const bool onBoundary = false)
: ParentType(problem, element, fvGeometry, fIdx, elemVolVars) {}
/*!
* \brief Default constructor
* \note This can be removed when the deprecated constructor is removed.
*/
ElTwoPFluxVariables() = default;
/*!
* \brief Compute / update the flux variables
*
......
......@@ -68,39 +68,6 @@ class ElasticFluxVariablesBase
typedef typename FVElementGeometry::SubControlVolumeFace SCVFace;
public:
/*
* \brief The old constructor
*
* \param problem The problem
* \param element The finite element
* \param fvGeometry The finite-volume geometry in the fully implicit scheme
* \param fIdx The local index of the SCV (sub-control-volume) face
* \param elemVolVars The volume variables of the current element
* \param onBoundary A boolean variable to specify whether the flux variables
* are calculated for interior SCV faces or boundary faces, default=false
*/
DUNE_DEPRECATED_MSG("FluxVariables now have to be default constructed and updated.")
ElasticFluxVariablesBase(const Problem &problem,
const Element &element,
const FVElementGeometry &fvGeometry,
int fIdx,
const ElementVolumeVariables &elemVolVars,
const bool onBoundary = false)
{
DUNE_THROW(Dune::InvalidStateException, "The FluxVariables now have to be default contructed. "
<< "In case you have your own FluxVariables you have to make them default "
<< " constructable too. All calls to the old constructor will throw this error. "
<< "Everywhere you instantiate FluxVariables do this now by default constructing "
<< "a FluxVariables object (FluxVariables fluxVars;) and then updating it where "
<< "the update method has the same signature as the old constructor (fluxVars.update(...).)");
}
/*!
* \brief Default constructor
* \note This can be removed when the deprecated constructor is removed.
*/
ElasticFluxVariablesBase() = default;
/*!
* \brief Compute / update the flux variables
*
......
......@@ -82,39 +82,6 @@ class OnePTwoCFluxVariables
typedef typename FVElementGeometry::SubControlVolumeFace SCVFace;
public:
/*
* \brief The old constructor
*
* \param problem The problem
* \param element The finite element
* \param fvGeometry The finite-volume geometry in the fully implicit scheme
* \param scvfIdx The local index of the SCV (sub-control-volume) face
* \param elemVolVars The volume variables of the current element
* \param onBoundary A boolean variable to specify whether the flux variables
* are calculated for interior SCV faces or boundary faces, default=false
*/
DUNE_DEPRECATED_MSG("FluxVariables now have to be default constructed and updated.")
OnePTwoCFluxVariables(const Problem &problem,
const Element &element,
const FVElementGeometry &fvGeometry,
const int fIdx,
const ElementVolumeVariables &elemVolVars,
const bool onBoundary = false)
{
DUNE_THROW(Dune::InvalidStateException, "The FluxVariables now have to be default contructed. "
<< "In case you have your own FluxVariables you have to make them default "
<< " constructable too. All calls to the old constructor will throw this error. "
<< "Everywhere you instantiate FluxVariables do this now by default constructing "
<< "a FluxVariables object (FluxVariables fluxVars;) and then updating it where "
<< "the update method has the same signature as the old constructor (fluxVars.update(...).)");
}
/*!
* \brief Default constructor
* \note This can be removed when the deprecated constructor is removed.
*/
OnePTwoCFluxVariables() = default;
/*!
* \brief Compute / update the flux variables
*
......
......@@ -73,32 +73,7 @@ class TwoPTwoCFluxVariables : public GET_PROP_TYPE(TypeTag, BaseFluxVariables)
typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry;
public:
/*!
* \brief The old constructor
*
* \param problem The problem
* \param element The finite element
* \param fvGeometry The finite-volume geometry in the fully implicit scheme
* \param fIdx The local index of the sub-control-volume face
* \param elemVolVars The volume variables of the current element
* \param onBoundary Evaluate flux at inner sub-control-volume face or on a boundary face
*/
DUNE_DEPRECATED_MSG("FluxVariables now have to be default constructed and updated.")
TwoPTwoCFluxVariables(const Problem &problem,
const Element &element,
const FVElementGeometry &fvGeometry,
const int fIdx,
const ElementVolumeVariables &elemVolVars,
const bool onBoundary = false)
: BaseFluxVariables(problem, element, fvGeometry, fIdx, elemVolVars, onBoundary) {}
/*!
* \brief Default constructor
* \note This can be removed when the deprecated constructor is removed.
*/
TwoPTwoCFluxVariables() = default;
public:
/*!
* \brief Compute / update the flux variables
*
......@@ -187,22 +162,6 @@ class TwoPTwoCFluxVariables : public GET_PROP_TYPE(TypeTag, BaseFluxVariables)
}
}
DUNE_DEPRECATED_MSG("This method will be removed without replacement!")
Scalar rhoFactor_(int phaseIdx, int scvIdx, const ElementVolumeVariables &vDat)
{
static const Scalar eps = 1e-2;
const Scalar sat = vDat[scvIdx].density(phaseIdx);
if (sat > eps)
return 0.5;
if (sat <= 0)
return 0;
static const Spline<Scalar> sp(0, eps, // x0, x1
0, 0.5, // y0, y1
0, 0); // m0, m1
return sp.eval(sat);
}
void calculatePorousDiffCoeff_(const Problem &problem,
const Element &element,
const ElementVolumeVariables &elemVolVars)
......
......@@ -68,32 +68,6 @@ class TwoPDFMFluxVariables : public ImplicitDarcyFluxVariables<TypeTag>
typedef Dune::FieldVector<Scalar, numPhases> PhasesVector;
public:
/*!
* \brief The old constructor
*
* \param problem The problem
* \param element The finite element
* \param fvGeometry The finite-volume geometry in the fully implicit scheme
* \param fIdx The local index of the SCV (sub-control-volume) face
* \param elemVolVars The volume variables of the current element
* \param onBoundary A boolean variable to specify whether the flux variables
* are calculated for interior SCV faces or boundary faces, default=false
*/
DUNE_DEPRECATED_MSG("FluxVariables now have to be default constructed and updated.")
TwoPDFMFluxVariables(const Problem &problem,
const Element &element,
const FVElementGeometry &fvGeometry,
int fIdx,
const ElementVolumeVariables &elemVolVars,
const bool onBoundary = false)
: ImplicitDarcyFluxVariables<TypeTag>(problem, element, fvGeometry, fIdx, elemVolVars, onBoundary) {}
/*!
* \brief Default constructor
* \note This can be removed when the deprecated constructor is removed.
*/
TwoPDFMFluxVariables() = default;
/*!
* \brief Compute / update the flux variables
*
......
......@@ -75,39 +75,6 @@ class TwoPMincFluxVariables
typedef typename FVElementGeometry::SubControlVolumeFace SCVFace;
public:
/*!
* \brief The old constructor
*
* \param problem The problem
* \param element The grid element
* \param fvGeometry The finite-volume geometry
* \param faceIdx The local index of the SCV (sub-control-volume) face
* \param elemVolVars The volume variables of the current element
* \param onBoundary A boolean variable to specify whether the flux variables
* are calculated for interior SCV faces or boundary faces, default=false
*/
DUNE_DEPRECATED_MSG("FluxVariables now have to be default constructed and updated.")
TwoPMincFluxVariables(const Problem &problem,
const Element &element,
const FVElementGeometry &fvGeometry,
const int faceIdx,
const ElementVolumeVariables &elemVolVars,
const bool onBoundary = false)
{
DUNE_THROW(Dune::InvalidStateException, "The FluxVariables now have to be default contructed. "
<< "In case you have your own FluxVariables you have to make them default "
<< " constructable too. All calls to the old constructor will throw this error. "
<< "Everywhere you instantiate FluxVariables do this now by default constructing "
<< "a FluxVariables object (FluxVariables fluxVars;) and then updating it where "
<< "the update method has the same signature as the old constructor (fluxVars.update(...).)");
}
/*!
* \brief Default constructor
* \note This can be removed when the deprecated constructor is removed.
*/
TwoPMincFluxVariables() = default;
/*!
* \brief Compute / update the flux variables
*
......
......@@ -80,31 +80,6 @@ class TwoPNCFluxVariables : public GET_PROP_TYPE(TypeTag, BaseFluxVariables)
};
public:
/*!
* \brief The old constructor
*
* \param problem The problem
* \param element The finite element
* \param fvGeometry The finite-volume geometry in the fully implicit scheme
* \param fIdx The local index of the sub-control-volume face
* \param elemVolVars The volume variables of the current element
* \param onBoundary Evaluate flux at inner sub-control-volume face or on a boundary face
*/
DUNE_DEPRECATED_MSG("FluxVariables now have to be default constructed and updated.")
TwoPNCFluxVariables(const Problem &problem,
const Element &element,
const FVElementGeometry &fvGeometry,
const int fIdx,
const ElementVolumeVariables &elemVolVars,
const bool onBoundary = false)
: BaseFluxVariables(problem, element, fvGeometry, fIdx, elemVolVars, onBoundary) {}
/*!
* \brief Default constructor
* \note This can be removed when the deprecated constructor is removed.
*/
TwoPNCFluxVariables() = default;
/*!
* \brief Compute / update the flux variables
*
......@@ -181,23 +156,6 @@ protected:
}
}
DUNE_DEPRECATED_MSG("This method will be removed without replacement!")
Scalar rhoFactor_(int phaseIdx, int scvIdx, const ElementVolumeVariables &vDat)
{
static const Scalar eps = 1e-2;
const Scalar sat = vDat[scvIdx].density(phaseIdx);
if (sat > eps)
return 0.5;
if (sat <= 0)
return 0;
static const Spline<Scalar> sp(0, eps, // x0, x1
0, 0.5, // y0, y1
0, 0); // m0, m1
return sp.eval(sat);
}
void calculatePorousDiffCoeff_(const Problem &problem,
const Element &element,
const ElementVolumeVariables &elemVolVars)
......@@ -246,21 +204,7 @@ protected:
}
}
DUNE_DEPRECATED_MSG("Use calculatePorousDiffCoeff_ (captial P)")
void calculateporousDiffCoeff_(const Problem &problem,
const Element &element,
const ElementVolumeVariables &elemVolVars)
{ calculatePorousDiffCoeff_(problem, element, elemVolVars); }
public:
DUNE_DEPRECATED_MSG("Use darcy flux variables interface.")
Scalar KmvpNormal(int phaseIdx) const
{ return this->kGradPNormal_[phaseIdx]; }
DUNE_DEPRECATED_MSG("Will be removed without replacement. Use darcy flux variables interface.")
GlobalPosition Kmvp(int phaseIdx) const
{ return this->kGradP_[phaseIdx]; }
/*!
* \brief The binary diffusion coefficient for each fluid phase.
*
......@@ -288,26 +232,6 @@ public:
Scalar molarDensity(int phaseIdx) const
{ return molarDensity_[phaseIdx]; }
/*!
* \brief The concentration gradient of a component in a phase.
*
* \param phaseIdx The phase index
* \param compIdx The component index
*/
DUNE_DEPRECATED_MSG("Use concentrationGrad!")
const GlobalPosition &massFractionGrad(int phaseIdx, int compIdx) const
{ return massFractionGrad_[phaseIdx][compIdx]; }
/*!
* \brief The molar concentration gradient of a component in a phase.
*
* \param phaseIdx The phase index
* \param compIdx The component index
*/
DUNE_DEPRECATED_MSG("Use concentrationGrad!")
const GlobalPosition &moleFractionGrad(int phaseIdx, int compIdx) const
{ return moleFractionGrad_[phaseIdx][compIdx]; }
/*!
* \brief The concentration gradient of a component in a phase.
*
......
......@@ -55,13 +55,11 @@ class TwoPNCMinFluxVariables : public TwoPNCFluxVariables<TypeTag>
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
typedef typename GET_PROP_TYPE(TypeTag, Problem) Problem;
typedef typename GET_PROP_TYPE(TypeTag, VolumeVariables) VolumeVariables;
typedef typename GridView::ctype CoordScalar;
typedef typename GridView::template Codim<0>::Entity Element;
typedef typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables) ElementVolumeVariables;
typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry;
enum {
dim = GridView::dimension,
......@@ -70,13 +68,7 @@ class TwoPNCMinFluxVariables : public TwoPNCFluxVariables<TypeTag>
numComponents = GET_PROP_VALUE(TypeTag, NumComponents),
};
typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry;
typedef typename GET_PROP_TYPE(TypeTag, SpatialParams) SpatialParams;
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
typedef typename FVElementGeometry::SubControlVolume SCV;
typedef typename FVElementGeometry::SubControlVolumeFace SCVFace;
typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition;
typedef Dune::FieldMatrix<CoordScalar, dimWorld, dimWorld> DimWorldMatrix;
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
......@@ -86,32 +78,6 @@ class TwoPNCMinFluxVariables : public TwoPNCFluxVariables<TypeTag>
wCompIdx = FluidSystem::wCompIdx,
};
public:
/*!
* \brief The old constructor
*
* \param problem The problem
* \param element The finite element
* \param fvGeometry The finite-volume geometry in the fully implicit scheme
* \param fIdx The local index of the sub-control-volume face
* \param elemVolVars The volume variables of the current element
* \param onBoundary Evaluate flux at inner sub-control-volume face or on a boundary face
*/
DUNE_DEPRECATED_MSG("FluxVariables now have to be default constructed and updated.")
TwoPNCMinFluxVariables(const Problem &problem,
const Element &element,
const FVElementGeometry &fvGeometry,
const int fIdx,
const ElementVolumeVariables &elemVolVars,
const bool onBoundary = false)
: ParentType(problem, element, fvGeometry, fIdx, elemVolVars, onBoundary) {}
/*!
* \brief Default constructor
* \note This can be removed when the deprecated constructor is removed.
*/
TwoPNCMinFluxVariables() = default;
protected:
/*!
* \brief Actual calculation of the normal Darcy velocities.
......@@ -128,10 +94,10 @@ protected:
const ElementVolumeVariables &elemVolVars)
{
// calculate the mean intrinsic permeability
const SpatialParams &spatialParams = problem.spatialParams();
const auto& spatialParams = problem.spatialParams();
DimWorldMatrix K(0.0);
const VolumeVariables &volVarsI = elemVolVars[this->face().i];
const VolumeVariables &volVarsJ = elemVolVars[this->face().j];
const auto& volVarsI = elemVolVars[this->face().i];
const auto& volVarsJ = elemVolVars[this->face().j];
if (GET_PROP_VALUE(TypeTag, ImplicitIsBox))
{
......@@ -192,8 +158,8 @@ protected:
}
// obtain the upwind volume variables
const VolumeVariables& upVolVars = elemVolVars[ this->upstreamIdx(phaseIdx) ];
const VolumeVariables& downVolVars = elemVolVars[ this->downstreamIdx(phaseIdx) ];
const auto& upVolVars = elemVolVars[ this->upstreamIdx(phaseIdx) ];
const auto& downVolVars = elemVolVars[ this->downstreamIdx(phaseIdx) ];
// the minus comes from the Darcy relation which states that
// the flux is from high to low potentials.
......
......@@ -82,30 +82,6 @@ class ThreePThreeCFluxVariables : public GET_PROP_TYPE(TypeTag, BaseFluxVariable
};
public:
/*!
* \brief The old constructor
*
* \param problem The problem
* \param element The finite element
* \param fvGeometry The finite-volume geometry in the fully implicit scheme
* \param fIdx The local index of the SCV (sub-control-volume) face
* \param elemVolVars The volume variables of the current element
* \param onBoundary Evaluate flux at inner sub-control-volume face or on a boundary face
*/
DUNE_DEPRECATED_MSG("FluxVariables now have to be default constructed and updated.")
ThreePThreeCFluxVariables(const Problem &problem,
const Element &element,
const FVElementGeometry &fvGeometry,
const int fIdx,
const ElementVolumeVariables &elemVolVars,
const bool onBoundary = false)
: BaseFluxVariables(problem, element, fvGeometry, fIdx, elemVolVars, onBoundary) {}
/*!
* \brief Default constructor
* \note This can be removed when the deprecated constructor is removed.
*/
ThreePThreeCFluxVariables() = default;
/*!
* \brief Compute / update the flux variables
......@@ -238,22 +214,6 @@ private:
}
}
DUNE_DEPRECATED_MSG("This method will be removed without replacement!")
Scalar rhoFactor_(int phaseIdx, int scvIdx, const ElementVolumeVariables &elemVolVars)
{
static const Scalar eps = 1e-2;
const Scalar sat = elemVolVars[scvIdx].density(phaseIdx);
if (sat > eps)
return 0.5;
if (sat <= 0)
return 0;
static const Spline<Scalar> sp(0, eps, // x0, x1
0, 0.5, // y0, y1
0, 0); // m0, m1
return sp.eval(sat);
}
void calculatePorousDiffCoeff_(const Problem &problem,
const Element &element,
const ElementVolumeVariables &elemVolVars)
......
......@@ -75,32 +75,6 @@ class MPNCFluxVariables
typedef MPNCFluxVariablesEnergy<TypeTag, enableEnergy, numEnergyEquations> FluxVariablesEnergy;
public:
/*
* \brief The old constructor
*
* \param problem The problem
* \param element The finite element
* \param fvGeometry The finite-volume geometry in the fully implicit scheme
* \param fIdx The local index of the SCV (sub-control-volume) face
* \param elemVolVars The volume variables of the current element
* \param onBoundary A boolean variable to specify whether the flux variables
* are calculated for interior SCV faces or boundary faces, default=false
*/
DUNE_DEPRECATED_MSG("FluxVariables now have to be default constructed and updated.")
MPNCFluxVariables(const Problem &problem,
const Element &element,
const FVElementGeometry &fvGeometry,
const unsigned int fIdx,
const ElementVolumeVariables &elemVolVars,
const bool onBoundary = false)
: BaseFluxVariables(problem, element, fvGeometry, fIdx, elemVolVars, onBoundary) {}
/*!
* \brief Default constructor
* \note This can be removed when the deprecated constructor is removed.
*/
MPNCFluxVariables() = default;
/*!
* \brief Compute / update the flux variables
*
......
......@@ -58,32 +58,6 @@ class NIFluxVariables : public GET_PROP_TYPE(TypeTag, IsothermalFluxVariables)
typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition;
public:
/*!
* \brief The old constructor
*
* \param problem The problem
* \param element The finite element
* \param fvGeometry The finite-volume geometry in the fully implicit scheme
* \param fIdx The local index of the sub-control-volume face
* \param elemVolVars The volume variables of the current element
* \param onBoundary Distinguishes if we are on a sub-control-volume face or on a boundary face
*/
DUNE_DEPRECATED_MSG("FluxVariables now have to be default constructed and updated.")
NIFluxVariables(const Problem &problem,
const Element &element,
const FVElementGeometry &fvGeometry,
const int fIdx,
const ElementVolumeVariables &elemVolVars,
bool onBoundary = false)
: ParentType(problem, element, fvGeometry, fIdx, elemVolVars, onBoundary) {}
/*!
* \brief Default constructor
* \note This can be removed when the deprecated constructor is removed.
*/
NIFluxVariables() = default;
/*!
* \brief Compute / update the flux variables
*
......
......@@ -44,47 +44,9 @@ class RichardsFluxVariables : public ImplicitDarcyFluxVariables<TypeTag>
friend class ImplicitDarcyFluxVariables<TypeTag>; // be friends with parent
typedef ImplicitDarcyFluxVariables<TypeTag> ParentType;
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;