Commit 08b5eca7 authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

[sequential] remove all calls to the deprecated `*_PARAM*` macros

Replace all calls of `*_PARAM*` macros by correspnding calls to
`getParam`. Remove the corresponding properties. If `getParam`
is called more than once for one parameter, specify a default value
in [`properties.hh`](dumux/porousmediumflow/sequential/properties.hh).
Otherwise, specify the default value in the call to `getParam`.
parent b38fc18e
......@@ -60,7 +60,7 @@ public:
*/
static void makeGrid()
{
std::string fileName = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, std::string, Grid, File);
auto fileName = getParam<std::string>("Grid.File");
deck() = Opm::Parser().parseFile(fileName);
Opm::EclipseGrid ecl_grid(deck());
......
......@@ -557,12 +557,9 @@ public:
DUNE_THROW(Dune::NotImplemented, "Saturation type not supported!");
}
ErrorTermFactor_ = getParam<Scalar>("Impet.ErrorTermFactor",
GET_PROP_VALUE(TypeTag, ImpetErrorTermFactor));
ErrorTermLowerBound_ = getParam<Scalar>("Impet.ErrorTermLowerBound",
GET_PROP_VALUE(TypeTag, ImpetErrorTermLowerBound));
ErrorTermUpperBound_ = getParam<Scalar>("Impet.ErrorTermUpperBound",
GET_PROP_VALUE(TypeTag, ImpetErrorTermUpperBound));
ErrorTermFactor_ = getParam<Scalar>("Impet.ErrorTermFactor");
ErrorTermLowerBound_ = getParam<Scalar>("Impet.ErrorTermLowerBound");
ErrorTermUpperBound_ = getParam<Scalar>("Impet.ErrorTermUpperBound");
density_[wPhaseIdx] = 0.;
density_[nPhaseIdx] = 0.;
......
......@@ -115,12 +115,9 @@ public:
const GridView& gridView, bool procBoundaryAsDirichlet = true) :
problem_(problem), gridView_(gridView), maxError_(0), timeStep_(1)
{
ErrorTermFactor_ = getParam<Scalar>("Impet.ErrorTermFactor",
GET_PROP_VALUE(TypeTag, ImpetErrorTermFactor));
ErrorTermLowerBound_ = getParam<Scalar>("Impet.ErrorTermLowerBound",
GET_PROP_VALUE(TypeTag, ImpetErrorTermLowerBound));
ErrorTermUpperBound_ = getParam<Scalar>("Impet.ErrorTermUpperBound",
GET_PROP_VALUE(TypeTag, ImpetErrorTermUpperBound));
ErrorTermFactor_ = getParam<Scalar>("Impet.ErrorTermFactor");
ErrorTermLowerBound_ = getParam<Scalar>("Impet.ErrorTermLowerBound");
ErrorTermUpperBound_ = getParam<Scalar>("Impet.ErrorTermUpperBound");
density_[wPhaseIdx] = 0.0;
density_[nPhaseIdx] = 0.0;
......
......@@ -121,12 +121,9 @@ public:
int size = gridView_.size(0);
rhs_.resize(size , 0.);
W_.resize(size);
ErrorTermFactor_ = getParam<Scalar>("Impet.ErrorTermFactor",
GET_PROP_VALUE(TypeTag, ImpetErrorTermFactor));
ErrorTermLowerBound_ = getParam<Scalar>("Impet.ErrorTermLowerBound",
GET_PROP_VALUE(TypeTag, ImpetErrorTermLowerBound));
ErrorTermUpperBound_ = getParam<Scalar>("Impet.ErrorTermUpperBound",
GET_PROP_VALUE(TypeTag, ImpetErrorTermUpperBound));
ErrorTermFactor_ = getParam<Scalar>("Impet.ErrorTermFactor");
ErrorTermLowerBound_ = getParam<Scalar>("Impet.ErrorTermLowerBound");
ErrorTermUpperBound_ = getParam<Scalar>("Impet.ErrorTermUpperBound");
density_[wPhaseIdx] = 0.0;
density_[nPhaseIdx] = 0.0;
......
......@@ -429,12 +429,9 @@ public:
DUNE_THROW(Dune::NotImplemented, "Dimension not supported!");
}
ErrorTermFactor_ = getParam<Scalar>("Impet.ErrorTermFactor",
GET_PROP_VALUE(TypeTag, ImpetErrorTermFactor));
ErrorTermLowerBound_ = getParam<Scalar>("Impet.ErrorTermLowerBound",
GET_PROP_VALUE(TypeTag, ImpetErrorTermLowerBound));
ErrorTermUpperBound_ = getParam<Scalar>("Impet.ErrorTermUpperBound",
GET_PROP_VALUE(TypeTag, ImpetErrorTermUpperBound));
ErrorTermFactor_ = getParam<Scalar>("Impet.ErrorTermFactor");
ErrorTermLowerBound_ = getParam<Scalar>("Impet.ErrorTermLowerBound");
ErrorTermUpperBound_ = getParam<Scalar>("Impet.ErrorTermUpperBound");
density_[wPhaseIdx] = 0.;
density_[nPhaseIdx] = 0.;
......
......@@ -473,12 +473,9 @@ public:
DUNE_THROW(Dune::NotImplemented, "Dimension not supported!");
}
ErrorTermFactor_ = getParam<Scalar>("Impet.ErrorTermFactor",
GET_PROP_VALUE(TypeTag, ImpetErrorTermFactor));
ErrorTermLowerBound_ = getParam<Scalar>("Impet.ErrorTermLowerBound",
GET_PROP_VALUE(TypeTag, ImpetErrorTermLowerBound));
ErrorTermUpperBound_ = getParam<Scalar>("Impet.ErrorTermUpperBound",
GET_PROP_VALUE(TypeTag, ImpetErrorTermUpperBound));
ErrorTermFactor_ = getParam<Scalar>("Impet.ErrorTermFactor");
ErrorTermLowerBound_ = getParam<Scalar>("Impet.ErrorTermLowerBound");
ErrorTermUpperBound_ = getParam<Scalar>("Impet.ErrorTermUpperBound");
density_[wPhaseIdx] = 0.;
density_[nPhaseIdx] = 0.;
......
......@@ -107,7 +107,7 @@ public:
viscosity_[wPhaseIdx] = 0.;
viscosity_[nPhaseIdx] = 0.;
calcVelocityInTransport_ = GET_PARAM_FROM_GROUP(TypeTag, bool, MPFA, CalcVelocityInTransport);
calcVelocityInTransport_ = getParam<bool>("MPFA.CalcVelocityInTransport");
}
//! Calculates the velocities at all cell-cell interfaces.
......
......@@ -117,7 +117,7 @@ public:
viscosity_[wPhaseIdx] = 0.;
viscosity_[nPhaseIdx] = 0.;
calcVelocityInTransport_ = GET_PARAM_FROM_GROUP(TypeTag, bool, MPFA, CalcVelocityInTransport);
calcVelocityInTransport_ = getParam<bool>("MPFA.CalcVelocityInTransport");
}
//! Calculates the velocities at all cell-cell interfaces.
......
......@@ -492,12 +492,9 @@ public:
DUNE_THROW(Dune::NotImplemented, "Dimension not supported!");
}
ErrorTermFactor_ = getParam<Scalar>("Impet.ErrorTermFactor",
GET_PROP_VALUE(TypeTag, ImpetErrorTermFactor));
ErrorTermLowerBound_ = getParam<Scalar>("Impet.ErrorTermLowerBound",
GET_PROP_VALUE(TypeTag, ImpetErrorTermLowerBound));
ErrorTermUpperBound_ = getParam<Scalar>("Impet.ErrorTermUpperBound",
GET_PROP_VALUE(TypeTag, ImpetErrorTermUpperBound));
ErrorTermFactor_ = getParam<Scalar>("Impet.ErrorTermFactor");
ErrorTermLowerBound_ = getParam<Scalar>("Impet.ErrorTermLowerBound");
ErrorTermUpperBound_ = getParam<Scalar>("Impet.ErrorTermUpperBound");
density_[wPhaseIdx] = 0.;
density_[nPhaseIdx] = 0.;
......
......@@ -102,7 +102,7 @@ public:
viscosity_[wPhaseIdx] = 0.;
viscosity_[nPhaseIdx] = 0.;
calcVelocityInTransport_ = GET_PARAM_FROM_GROUP(TypeTag, bool, MPFA, CalcVelocityInTransport);
calcVelocityInTransport_ = getParam<bool>("MPFA.CalcVelocityInTransport");
}
void calculateVelocity();
......
......@@ -104,7 +104,7 @@ public:
viscosity_[wPhaseIdx] = 0.;
viscosity_[nPhaseIdx] = 0.;
calcVelocityInTransport_ = GET_PARAM_FROM_GROUP(TypeTag, bool, MPFA, CalcVelocityInTransport);
calcVelocityInTransport_ = getParam<bool>("MPFA.CalcVelocityInTransport");
}
void calculateVelocity();
......
......@@ -131,9 +131,9 @@ public:
DUNE_THROW(Dune::NotImplemented, "Dimension not supported!");
}
enableSimpleLStencil_ = GET_PARAM_FROM_GROUP(TypeTag, bool, MPFA, EnableSimpleLStencil);
enableComplexLStencil_ = GET_PARAM_FROM_GROUP(TypeTag, bool, MPFA, EnableComplexLStencil);
enableTPFA_= GET_PARAM_FROM_GROUP(TypeTag, bool, MPFA, EnableTPFA);
enableSimpleLStencil_ = getParam<bool>("MPFA.EnableSimpleLStencil", true);
enableComplexLStencil_ = getParam<bool>("MPFA.EnableComplexLStencil", true);
enableTPFA_= getParam<bool>("MPFA.EnableTPFA", false);
if (!enableSimpleLStencil_ && !enableComplexLStencil_)
{
......@@ -141,9 +141,9 @@ public:
enableTPFA_ = true;
}
transChoiceThreshold_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, MPFA, TransmissibilityCriterionThreshold);
transChoiceThreshold_ = getParam<Scalar>("MPFA.TransmissibilityCriterionThreshold", 1e-8);
transCriterion_ = GET_PARAM_FROM_GROUP(TypeTag, int, MPFA, TransmissibilityCriterion);
transCriterion_ = getParam<int>("MPFA.TransmissibilityCriterion", 0);
if (transCriterion_ == sDiff)
{
std::cout << "MPFAL 3D: Using standard transmissibility criterion\n";
......
......@@ -416,12 +416,9 @@ public:
DUNE_THROW(Dune::NotImplemented, "Dimension not supported!");
}
ErrorTermFactor_ = getParam<Scalar>("Impet.ErrorTermFactor",
GET_PROP_VALUE(TypeTag, ImpetErrorTermFactor));
ErrorTermLowerBound_ = getParam<Scalar>("Impet.ErrorTermLowerBound",
GET_PROP_VALUE(TypeTag, ImpetErrorTermLowerBound));
ErrorTermUpperBound_ = getParam<Scalar>("Impet.ErrorTermUpperBound",
GET_PROP_VALUE(TypeTag, ImpetErrorTermUpperBound));
ErrorTermFactor_ = getParam<Scalar>("Impet.ErrorTermFactor");
ErrorTermLowerBound_ = getParam<Scalar>("Impet.ErrorTermLowerBound");
ErrorTermUpperBound_ = getParam<Scalar>("Impet.ErrorTermUpperBound");
density_[wPhaseIdx] = 0.;
density_[nPhaseIdx] = 0.;
......
......@@ -107,7 +107,7 @@ public:
viscosity_[wPhaseIdx] = 0.;
viscosity_[nPhaseIdx] = 0.;
calcVelocityInTransport_ = GET_PARAM_FROM_GROUP(TypeTag, bool, MPFA, CalcVelocityInTransport);
calcVelocityInTransport_ = getParam<bool>("MPFA.CalcVelocityInTransport");
}
//! Calculates the velocities at all cell-cell interfaces.
......
......@@ -202,8 +202,8 @@ public:
GridAdaptionIndicator2P (Problem& problem):
problem_(problem)
{
refinetol_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, GridAdapt, RefineTolerance);
coarsentol_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, GridAdapt, CoarsenTolerance);
refinetol_ = getParam<Scalar>("GridAdapt.RefineTolerance");
coarsentol_ = getParam<Scalar>("GridAdapt.CoarsenTolerance");
}
protected:
......
......@@ -289,11 +289,11 @@ public:
GridAdaptionIndicator2PLocal (Problem& problem):
problem_(problem)
{
refinetol_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, GridAdapt, RefineTolerance);
coarsentol_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, GridAdapt, CoarsenTolerance);
refineAtDirichletBC_ = GET_PARAM_FROM_GROUP(TypeTag, bool, GridAdapt, RefineAtDirichletBC);
refineAtFluxBC_ = GET_PARAM_FROM_GROUP(TypeTag, bool, GridAdapt, RefineAtFluxBC);
refineAtSource_ = GET_PARAM_FROM_GROUP(TypeTag, bool, GridAdapt, RefineAtSource);
refinetol_ = getParam<Scalar>("GridAdapt.RefineTolerance");
coarsentol_ = getParam<Scalar>("GridAdapt.CoarsenTolerance");
refineAtDirichletBC_ = getParam<bool>("GridAdapt.RefineAtDirichletBC");
refineAtFluxBC_ = getParam<bool>("GridAdapt.RefineAtFluxBC");
refineAtSource_ = getParam<bool>("GridAdapt.RefineAtSource");
}
private:
......@@ -304,9 +304,9 @@ private:
Scalar coarsenBound_;
ScalarSolutionType indicatorVector_;
static const int saturationType_ = GET_PROP_VALUE(TypeTag, SaturationFormulation);
bool refineAtDirichletBC_;
bool refineAtFluxBC_;
bool refineAtSource_;
bool refineAtDirichletBC_; //!< switch for refinement at Dirichlet BC's
bool refineAtFluxBC_; //!< switch for refinement at Neumann BC's
bool refineAtSource_; //!< switch for refinement at sources
};
}
......
......@@ -30,28 +30,6 @@
namespace Dumux
{
namespace Properties
{
NEW_PROP_TAG(GridAdaptRefineThresholdFlux);
NEW_PROP_TAG(GridAdaptCoarsenThresholdFlux);
NEW_PROP_TAG(GridAdaptRefineThresholdSat);
NEW_PROP_TAG(GridAdaptCoarsenThresholdSat);
NEW_PROP_TAG(GridAdaptRefinePercentileFlux);
NEW_PROP_TAG(GridAdaptCoarsenPercentileFlux);
NEW_PROP_TAG(GridAdaptRefinePercentileSat);
NEW_PROP_TAG(GridAdaptCoarsenPercentileSat);
SET_SCALAR_PROP(GridAdaptTypeTag, GridAdaptRefineThresholdFlux, 0.8);
SET_SCALAR_PROP(GridAdaptTypeTag, GridAdaptCoarsenThresholdFlux, 0.2);
SET_SCALAR_PROP(GridAdaptTypeTag, GridAdaptRefineThresholdSat, 0.8);
SET_SCALAR_PROP(GridAdaptTypeTag, GridAdaptCoarsenThresholdSat, 0.2);
SET_SCALAR_PROP(GridAdaptTypeTag, GridAdaptRefinePercentileFlux, 0.8);
SET_SCALAR_PROP(GridAdaptTypeTag, GridAdaptCoarsenPercentileFlux, 0.2);
SET_SCALAR_PROP(GridAdaptTypeTag, GridAdaptRefinePercentileSat, 0.8);
SET_SCALAR_PROP(GridAdaptTypeTag, GridAdaptCoarsenPercentileSat, 0.2);
}
/*!
* \brief Class defining a standard, saturation dependent indicator for grid adaption
* \ingroup SequentialTwoPModel
......@@ -645,19 +623,19 @@ public:
GridAdaptionIndicator2PLocalFlux (Problem& problem):
problem_(problem), lowerPressureBound_(0.0), upperPressureBound_(std::numeric_limits<Scalar>::max())
{
refineThresholdSat_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, GridAdapt, RefineThresholdSat);
coarsenThresholdSat_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, GridAdapt, CoarsenThresholdSat);
refineThresholdSat_ = getParam<Scalar>("GridAdapt.RefineThresholdSat", 0.8);
coarsenThresholdSat_ = getParam<Scalar>("GridAdapt.CoarsenThresholdSat", 0.2);
refineBound_ = 2.0;
coarsenBound_ = 1.0;
refineThresholdFlux_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, GridAdapt, RefineThresholdFlux);
coarsenThresholdFlux_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, GridAdapt, CoarsenThresholdFlux);
refinePercentileFlux_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, GridAdapt, RefinePercentileFlux);
coarsenPercentileFlux_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, GridAdapt, CoarsenPercentileFlux);
refinePercentileSat_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, GridAdapt, RefinePercentileSat);
coarsenPercentileSat_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, GridAdapt, CoarsenPercentileSat);
refineAtDirichletBC_ = GET_PARAM_FROM_GROUP(TypeTag, bool, GridAdapt, RefineAtDirichletBC);
refineAtFluxBC_ = GET_PARAM_FROM_GROUP(TypeTag, bool, GridAdapt, RefineAtFluxBC);
refineAtSource_ = GET_PARAM_FROM_GROUP(TypeTag, bool, GridAdapt, RefineAtSource);
refineThresholdFlux_ = getParam<Scalar>("GridAdapt.RefineThresholdFlux", 0.8);
coarsenThresholdFlux_ = getParam<Scalar>("GridAdapt.CoarsenThresholdFlux", 0.2);
refinePercentileFlux_ = getParam<Scalar>("GridAdapt.RefinePercentileFlux", 0.8);
coarsenPercentileFlux_ = getParam<Scalar>("GridAdapt.CoarsenPercentileFlux", 0.2);
refinePercentileSat_ = getParam<Scalar>("GridAdapt.RefinePercentileSat", 0.8);
coarsenPercentileSat_ = getParam<Scalar>("GridAdapt.CoarsenPercentileSat", 0.2);
refineAtDirichletBC_ = getParam<bool>("GridAdapt.RefineAtDirichletBC");
refineAtFluxBC_ = getParam<bool>("GridAdapt.RefineAtFluxBC");
refineAtSource_ = getParam<bool>("GridAdapt.RefineAtSource");
useSatInd_ = (refineThresholdSat_ < 1.0 || coarsenThresholdSat_ > 0.0);
useFluxInd_ = (refineThresholdFlux_ < 1.0 || coarsenThresholdFlux_ > 0.0);
......
......@@ -61,15 +61,6 @@ NEW_PROP_TAG( VelocityFormulation); //!< The type of velocity reconstructed for
NEW_PROP_TAG( EnableCompressibility);//!< Returns whether compressibility is allowed
NEW_PROP_TAG( FluidSystem ); //!< Defines the fluid system
NEW_PROP_TAG( FluidState );//!< Defines the fluid state
//! Scaling factor for the error term (term to damp unphysical saturation overshoots via pressure correction)
NEW_PROP_TAG( ImpetErrorTermFactor );
//! Lower threshold used for the error term evaluation (term to damp unphysical saturation overshoots via pressure correction)
NEW_PROP_TAG( ImpetErrorTermLowerBound );
//! Upper threshold used for the error term evaluation (term to damp unphysical saturation overshoots via pressure correction)
NEW_PROP_TAG( ImpetErrorTermUpperBound );
}
}
......@@ -139,13 +130,6 @@ public:
//! The spatial parameters to be employed. Use SequentialFVSpatialParams by default.
SET_TYPE_PROP(SequentialTwoP, SpatialParams, SequentialFVSpatialParams<TypeTag>);
//! Default error term factor
SET_SCALAR_PROP(SequentialTwoP, ImpetErrorTermFactor, 0.5);
//! Default lower threshold for evaluation of an error term
SET_SCALAR_PROP(SequentialTwoP, ImpetErrorTermLowerBound, 0.1);
//! Default upper threshold for evaluation of an error term
SET_SCALAR_PROP(SequentialTwoP, ImpetErrorTermUpperBound, 0.9);
// \}
}
......
......@@ -192,7 +192,7 @@ public:
density_[wPhaseIdx] = 0.;
density_[nPhaseIdx] = 0.;
porosityThreshold_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, Impet, PorosityThreshold);
porosityThreshold_ = getParam<Scalar>("Impet.PorosityThreshold");
}
private:
......
......@@ -121,7 +121,7 @@ public:
EvalCflFluxDefault (Problem& problem)
: problem_(problem)
{
porosityThreshold_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, Impet, PorosityThreshold);
porosityThreshold_ = getParam<Scalar>("Impet.PorosityThreshold");
reset();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment