diff --git a/dumux/io/cpgridcreator.hh b/dumux/io/cpgridcreator.hh index 87247965cff3d7fd9c4a8ed20194b6afa02fab3c..9cec6ee56d6c93dfb054aeb549309f43816a9cc0 100644 --- a/dumux/io/cpgridcreator.hh +++ b/dumux/io/cpgridcreator.hh @@ -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()); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/pressure.hh b/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/pressure.hh index 25ff36459190b729dda1c8b1f173966489295a09..6bbabe7b2d4118232fff7b75d703b76164323bb8 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/pressure.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/pressure.hh @@ -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.; diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/mimetic.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/mimetic.hh index d389691aca04ac725d5c8bafdc77a930643aa60d..f72e2b01cdcb25db6cfea659ff6e3515bbc79da2 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/mimetic.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/mimetic.hh @@ -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; diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/mimeticadaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/mimeticadaptive.hh index 916f2fc0af275df48b2e50c101d662544f1850b5..800a871227b72ccef6a9a5ed5c5fb958d924e35c 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/mimeticadaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/mimeticadaptive.hh @@ -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; diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressure.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressure.hh index 87752ef7d5430edbfeeadf311f847ac799a902d3..9809f16218dcbcbf0d7eb07fa93758ac29f3b19e 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressure.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressure.hh @@ -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.; diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressureadaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressureadaptive.hh index ebdce54e14af9dd65435ca2087b4ca11f5870c1b..f520afc38b5d24416b451b17a7428b0136d8730f 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressureadaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressureadaptive.hh @@ -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.; diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurevelocity.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurevelocity.hh index f932332f8a34341363f2ef07d42c948ead243742..ae5d9dfdfa0ec7f47b42c92993122f9c38b4b994 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurevelocity.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurevelocity.hh @@ -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. diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurevelocityadaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurevelocityadaptive.hh index 4f320460b93433c30983e9651b0f257231cbacab..dd145160117ff9781cc9edbb6638bc31d2a541d3 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurevelocityadaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurevelocityadaptive.hh @@ -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. diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressure.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressure.hh index e064339ba959688b133b50d7961b2ca1544f510c..aa2b5b0e6f668be79e00741e545b3fa6bb745599 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressure.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressure.hh @@ -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.; diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressurevelocity.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressurevelocity.hh index ae7cf6f3007de9d0ec6d3d053626599615760de3..02100c3a9ecd31c2b2f84fa3aed0a52ee0563408 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressurevelocity.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressurevelocity.hh @@ -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(); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressurevelocityadaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressurevelocityadaptive.hh index 9f0dde599c2830f0425f2280af9657bb60e72cc8..a858c74b445e34c56f798bebfac037b6562f66be 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressurevelocityadaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressurevelocityadaptive.hh @@ -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(); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dtransmissibilitycalculator.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dtransmissibilitycalculator.hh index 8d781c7db3c1bb2d56a4ee6471b9a42cb1b56a50..26c92a3abcfd60d4dbe2bb1474ac56f4a2c8e09b 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dtransmissibilitycalculator.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dtransmissibilitycalculator.hh @@ -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"; diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressure.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressure.hh index 1bf15f4fdfc6e9c59670ed92432ce0950a11ec13..82991be6ec4b8e961e82a77bd1f944a83319b785 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressure.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressure.hh @@ -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.; diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressurevelocity.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressurevelocity.hh index 339dbaf50bcef497a59f392ee8c22ffec7a47446..1ddea79dd0b791f9e48881cb66b15bcca8e91ab3 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressurevelocity.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressurevelocity.hh @@ -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. diff --git a/dumux/porousmediumflow/2p/sequential/impes/gridadaptionindicator.hh b/dumux/porousmediumflow/2p/sequential/impes/gridadaptionindicator.hh index 88039919f5547d2b597cab2060423b22e63f2175..8e0ea932585dc825199a8c9b5778996c0895f79b 100644 --- a/dumux/porousmediumflow/2p/sequential/impes/gridadaptionindicator.hh +++ b/dumux/porousmediumflow/2p/sequential/impes/gridadaptionindicator.hh @@ -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: diff --git a/dumux/porousmediumflow/2p/sequential/impes/gridadaptionindicatorlocal.hh b/dumux/porousmediumflow/2p/sequential/impes/gridadaptionindicatorlocal.hh index 115a7683729e987fa4659580b3d4ae2aba018956..9148825c5ed6af26b7838d0dc9b95c42f1157ce5 100644 --- a/dumux/porousmediumflow/2p/sequential/impes/gridadaptionindicatorlocal.hh +++ b/dumux/porousmediumflow/2p/sequential/impes/gridadaptionindicatorlocal.hh @@ -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 }; } diff --git a/dumux/porousmediumflow/2p/sequential/impes/gridadaptionindicatorlocalflux.hh b/dumux/porousmediumflow/2p/sequential/impes/gridadaptionindicatorlocalflux.hh index 5b39984b7ef57ca14d73956b6955c1762c3c8541..79d2fa839bd776d99b6a6a149fa6ff9a4dc2287b 100644 --- a/dumux/porousmediumflow/2p/sequential/impes/gridadaptionindicatorlocalflux.hh +++ b/dumux/porousmediumflow/2p/sequential/impes/gridadaptionindicatorlocalflux.hh @@ -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); diff --git a/dumux/porousmediumflow/2p/sequential/properties.hh b/dumux/porousmediumflow/2p/sequential/properties.hh index 3a905136eccbff8a7768424feb1daed805c90f21..eed30dea43ba97c15a53dfb57d5c54e39d6d53d9 100644 --- a/dumux/porousmediumflow/2p/sequential/properties.hh +++ b/dumux/porousmediumflow/2p/sequential/properties.hh @@ -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); // \} } diff --git a/dumux/porousmediumflow/2p/sequential/transport/cellcentered/evalcflfluxcoats.hh b/dumux/porousmediumflow/2p/sequential/transport/cellcentered/evalcflfluxcoats.hh index 5ccd3bf428ba65cb523d1139adfe4467a2e83d03..6837aafc28f033b3398768dd65c95466ee134818 100644 --- a/dumux/porousmediumflow/2p/sequential/transport/cellcentered/evalcflfluxcoats.hh +++ b/dumux/porousmediumflow/2p/sequential/transport/cellcentered/evalcflfluxcoats.hh @@ -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: diff --git a/dumux/porousmediumflow/2p/sequential/transport/cellcentered/evalcflfluxdefault.hh b/dumux/porousmediumflow/2p/sequential/transport/cellcentered/evalcflfluxdefault.hh index 6c4f9f83f4540edd6346cff292c17d2cd4ca4e2a..58b59a522187d03efcf0e9dc9b3cca8c9afddcb1 100644 --- a/dumux/porousmediumflow/2p/sequential/transport/cellcentered/evalcflfluxdefault.hh +++ b/dumux/porousmediumflow/2p/sequential/transport/cellcentered/evalcflfluxdefault.hh @@ -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(); } diff --git a/dumux/porousmediumflow/2p/sequential/transport/cellcentered/saturation.hh b/dumux/porousmediumflow/2p/sequential/transport/cellcentered/saturation.hh index f9d40c0ac234140e3e3624443670cebb26ac0296..17ff39242619982c41835643e633e6893c6f33aa 100644 --- a/dumux/porousmediumflow/2p/sequential/transport/cellcentered/saturation.hh +++ b/dumux/porousmediumflow/2p/sequential/transport/cellcentered/saturation.hh @@ -469,7 +469,7 @@ public: */ FVSaturation2P(Problem& problem) : ParentType(problem), problem_(problem), threshold_(1e-6), - switchNormals_(GET_PARAM_FROM_GROUP(TypeTag, bool, Impet, SwitchNormals)) + switchNormals_(getParam<bool>("Impet.SwitchNormals")) { if (compressibility_ && velocityType_ == vt) { @@ -494,7 +494,7 @@ public: velocity_ = std::make_shared<Velocity>(problem); vtkOutputLevel_ = getParam<int>("Vtk.OutputLevel"); - porosityThreshold_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, Impet, PorosityThreshold); + porosityThreshold_ = getParam<Scalar>("Impet.PorosityThreshold"); } private: diff --git a/dumux/porousmediumflow/2p/sequential/transport/problem.hh b/dumux/porousmediumflow/2p/sequential/transport/problem.hh index ac4e0e7068df56298c8e1043a88a4213f4a47600..884186c5ce27325a5b9c6c321b684b256cd2adcc 100644 --- a/dumux/porousmediumflow/2p/sequential/transport/problem.hh +++ b/dumux/porousmediumflow/2p/sequential/transport/problem.hh @@ -96,7 +96,7 @@ public: : ParentType(timeManager, gridView), gravity_(0) { - cFLFactor_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, Impet, CFLFactor); + cFLFactor_ = getParam<Scalar>("Impet.CFLFactor"); spatialParams_ = std::make_shared<SpatialParams>(gridView); @@ -116,7 +116,7 @@ public: : ParentType(timeManager, gridView), gravity_(0) { - cFLFactor_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, Impet, CFLFactor); + cFLFactor_ = getParam<Scalar>("Impet.CFLFactor"); spatialParams_ = Dune::stackobject_to_shared_ptr<SpatialParams>(spatialParams); diff --git a/dumux/porousmediumflow/2p2c/sequential/adaptiveproperties.hh b/dumux/porousmediumflow/2p2c/sequential/adaptiveproperties.hh index 25cc3b1edcd752e7158316205732541cb94822c0..32fb20cee3bcc61775a0406f3d6ae61a99efdc58 100644 --- a/dumux/porousmediumflow/2p2c/sequential/adaptiveproperties.hh +++ b/dumux/porousmediumflow/2p2c/sequential/adaptiveproperties.hh @@ -54,13 +54,6 @@ namespace Properties ////////////////////////////////////////////////////////////////// //! The type tag for the compositional two-phase problems NEW_TYPE_TAG(SequentialTwoPTwoCAdaptive, INHERITS_FROM(SequentialTwoPTwoC)); - -////////////////////////////////////////////////////////////////// -// Property tags -////////////////////////////////////////////////////////////////// - -NEW_PROP_TAG( GridAdaptEnableMultiPointFluxApproximation); //!< HangingNode: Two-point flux approximation (false) or mpfa (true) -NEW_PROP_TAG(GridAdaptMaxInteractionVolumes); //!< Maximum number of interaction regions (2D and 3D) }} //Dumux includes @@ -78,8 +71,6 @@ namespace Properties { ////////////////////////////////////////////////////////////////// SET_BOOL_PROP(SequentialTwoPTwoCAdaptive, AdaptiveGrid, true); SET_TYPE_PROP(SequentialTwoPTwoCAdaptive, GridTypeIndices, GridTypes); //!< Property not used but default necessary for mpfa2p -SET_BOOL_PROP(SequentialTwoPTwoCAdaptive, GridAdaptEnableMultiPointFluxApproximation, true); //!< applies an mpfa method around hanging nodes -SET_INT_PROP(SequentialTwoPTwoCAdaptive, GridAdaptMaxInteractionVolumes, 4); //!< Uses up to 4 interaction regions as default SET_TYPE_PROP(SequentialTwoPTwoCAdaptive, CellData, CellData2P2CAdaptive<TypeTag>); SET_TYPE_PROP(SequentialTwoPTwoCAdaptive, Variables, VariableClass2P2CAdaptive<TypeTag>); diff --git a/dumux/porousmediumflow/2p2c/sequential/fv2dpressureadaptive.hh b/dumux/porousmediumflow/2p2c/sequential/fv2dpressureadaptive.hh index f81bbd910c87bcf1a5c1e5ef6cacf1b9c452f9b7..028884c14ad26cc217377e1963f85f9271b145aa 100644 --- a/dumux/porousmediumflow/2p2c/sequential/fv2dpressureadaptive.hh +++ b/dumux/porousmediumflow/2p2c/sequential/fv2dpressureadaptive.hh @@ -164,10 +164,10 @@ public: FV2dPressure2P2CAdaptive(Problem& problem) : FVPressure2P2C<TypeTag>(problem), problem_(problem), transmissibilityCalculator_(problem) { - enableVolumeIntegral = GET_PARAM_FROM_GROUP(TypeTag,bool, Impet, EnableVolumeIntegral); - enableMPFA= GET_PARAM_FROM_GROUP(TypeTag,bool, GridAdapt, EnableMultiPointFluxApproximation); + enableVolumeIntegral = getParam<bool>("Impet.EnableVolumeIntegral"); + enableMPFA = getParam<bool>("GridAdapt.EnableMultiPointFluxApproximation"); - if(GET_PARAM_FROM_GROUP(TypeTag,int, GridAdapt, MaxInteractionVolumes) != 1) + if(getParam<int>("GridAdapt.MaxInteractionVolumes") != 1) enableSecondHalfEdge = true; else enableSecondHalfEdge = false; diff --git a/dumux/porousmediumflow/2p2c/sequential/fv2dtransportadaptive.hh b/dumux/porousmediumflow/2p2c/sequential/fv2dtransportadaptive.hh index b558bbf863423a205560b2bfb3bb4278d3cb5f0b..c41dac4b6d96afade159481b542f0683880f050c 100644 --- a/dumux/porousmediumflow/2p2c/sequential/fv2dtransportadaptive.hh +++ b/dumux/porousmediumflow/2p2c/sequential/fv2dtransportadaptive.hh @@ -113,7 +113,7 @@ public: FV2dTransport2P2CAdaptive(Problem& problem) : FVTransport2P2C<TypeTag>(problem), problem_(problem) { - enableMPFA = GET_PARAM_FROM_GROUP(TypeTag,bool,GridAdapt, EnableMultiPointFluxApproximation); + enableMPFA = getParam<bool>("GridAdapt.EnableMultiPointFluxApproximation"); } virtual ~FV2dTransport2P2CAdaptive() @@ -318,7 +318,7 @@ void FV2dTransport2P2CAdaptive<TypeTag>::update(const Scalar t, Scalar& dt, Tran if(impet) { Dune::dinfo << "Timestep restricted by CellIdx " << restrictingCell << " leads to dt = " - <<dt * GET_PARAM_FROM_GROUP(TypeTag, Scalar,Impet, CFLFactor)<< std::endl; + <<dt * getParam<Scalar>("Impet.CFLFactor")<< std::endl; if(this->averagedFaces_ != 0) Dune::dinfo << " Averageing done for " << this->averagedFaces_ << " faces. "<< std::endl; } diff --git a/dumux/porousmediumflow/2p2c/sequential/fv3dpressureadaptive.hh b/dumux/porousmediumflow/2p2c/sequential/fv3dpressureadaptive.hh index 3b684c54e78d48c9c2ad188cad395bb96078031a..4b34485e70f047897ea0eb264c35e363838d93a5 100644 --- a/dumux/porousmediumflow/2p2c/sequential/fv3dpressureadaptive.hh +++ b/dumux/porousmediumflow/2p2c/sequential/fv3dpressureadaptive.hh @@ -251,9 +251,9 @@ public: interactionVolumesContainer_(0), mpfal3DTransmissibilityCalculator_(problem) { enableVolumeIntegral_ = this->enableVolumeIntegral; - enableMPFA= GET_PARAM_FROM_GROUP(TypeTag,bool, GridAdapt, EnableMultiPointFluxApproximation); + enableMPFA = getParam<bool>("GridAdapt.EnableMultiPointFluxApproximation"); - maxInteractionVolumes = GET_PARAM_FROM_GROUP(TypeTag,int, GridAdapt, MaxInteractionVolumes); + maxInteractionVolumes = getParam<int>("GridAdapt.MaxInteractionVolumes"); } private: @@ -1854,10 +1854,6 @@ int FV3dPressure2P2CAdaptive<TypeTag>::transmissibilityAdapter_(const Intersecti = {unity, unity, unity, unity, unity, unity, unity, unity}; Dune::FieldVector<bool, 4> useCases(false); -// static Scalar transChoiceThreshold_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, MPFA, TransmissibilityCriterionThreshold); -// if(!properFluxDirection) -// mpfal3DTransmissibilityCalculator_.setTransChoiceThreshold(-transChoiceThreshold_); - /*********** calculate transmissibility for that case ******/ switch(subVolumeFaceIdx) { diff --git a/dumux/porousmediumflow/2p2c/sequential/fv3dtransportadaptive.hh b/dumux/porousmediumflow/2p2c/sequential/fv3dtransportadaptive.hh index b687a9f5947ea72e80523e9a3d0501224fc4712b..261d5c4399466dabff745d9f7c12a07833ad070b 100644 --- a/dumux/porousmediumflow/2p2c/sequential/fv3dtransportadaptive.hh +++ b/dumux/porousmediumflow/2p2c/sequential/fv3dtransportadaptive.hh @@ -121,7 +121,7 @@ public: FV3dTransport2P2CAdaptive(Problem& problem) : FVTransport2P2C<TypeTag>(problem), problem_(problem), enableMPFA(false) { - enableMPFA = GET_PARAM_FROM_GROUP(TypeTag,bool,GridAdapt, EnableMultiPointFluxApproximation); + enableMPFA = getParam<bool>("GridAdapt.EnableMultiPointFluxApproximation"); } virtual ~FV3dTransport2P2CAdaptive() @@ -315,7 +315,7 @@ void FV3dTransport2P2CAdaptive<TypeTag>::update(const Scalar t, Scalar& dt, if(impet) { Dune::dinfo << "Timestep restricted by CellIdx " << restrictingCell << " leads to dt = " - <<dt * GET_PARAM_FROM_GROUP(TypeTag, Scalar,Impet, CFLFactor)<< std::endl; + <<dt * getParam<Scalar>("Impet.CFLFactor")<< std::endl; if(this->averagedFaces_ != 0) Dune::dwarn << " Averageing done for " << this->averagedFaces_ << " faces. "<< std::endl; } diff --git a/dumux/porousmediumflow/2p2c/sequential/fvpressure.hh b/dumux/porousmediumflow/2p2c/sequential/fvpressure.hh index 6cb44d2d6bb283d47200478f452aad25c99c6b33..ee6cbf19d9293df8c5fe3ed51fa0559b676cc6e2 100644 --- a/dumux/porousmediumflow/2p2c/sequential/fvpressure.hh +++ b/dumux/porousmediumflow/2p2c/sequential/fvpressure.hh @@ -162,15 +162,15 @@ public: FVPressure2P2C(Problem& problem) : FVPressureCompositional<TypeTag>(problem), problem_(problem) { - ErrorTermFactor_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, Impet, ErrorTermFactor); - ErrorTermLowerBound_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, Impet, ErrorTermLowerBound); - ErrorTermUpperBound_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, Impet, ErrorTermUpperBound); + ErrorTermFactor_ = getParam<Scalar>("Impet.ErrorTermFactor"); + ErrorTermLowerBound_ = getParam<Scalar>("Impet.ErrorTermLowerBound", 0.2); + ErrorTermUpperBound_ = getParam<Scalar>("Impet.ErrorTermUpperBound"); - enableVolumeIntegral = GET_PARAM_FROM_GROUP(TypeTag,bool, Impet, EnableVolumeIntegral); + enableVolumeIntegral = getParam<bool>("Impet.EnableVolumeIntegral"); regulateBoundaryPermeability = GET_PROP_VALUE(TypeTag, RegulateBoundaryPermeability); if(regulateBoundaryPermeability) { - minimalBoundaryPermeability = GET_RUNTIME_PARAM(TypeTag, Scalar, SpatialParams.MinBoundaryPermeability); + minimalBoundaryPermeability = getParam<Scalar>("SpatialParams.MinBoundaryPermeability"); Dune::dinfo << " Warning: Regulating Boundary Permeability requires correct subface indices on reference elements!" << std::endl; } diff --git a/dumux/porousmediumflow/2p2c/sequential/fvpressurecompositional.hh b/dumux/porousmediumflow/2p2c/sequential/fvpressurecompositional.hh index 7d73f3c13765ac67d4511928711eb51a4cbfefc7..4285956569f626594966b810c55ee4c4b7adfe3f 100644 --- a/dumux/porousmediumflow/2p2c/sequential/fvpressurecompositional.hh +++ b/dumux/porousmediumflow/2p2c/sequential/fvpressurecompositional.hh @@ -138,7 +138,7 @@ public: // estimate then the size of the last time step if(Dune::FloatCmp::eq<Scalar>(problem_.timeManager().time(), problem_.timeManager().episodeStartTime()) && problem_.timeManager().episodeIndex() > 1) - problem_.timeManager().setTimeStepSize(dt_estimate*GET_PARAM_FROM_GROUP(TypeTag, Scalar, Impet, CFLFactor)); + problem_.timeManager().setTimeStepSize(dt_estimate*getParam<Scalar>("Impet.CFLFactor")); updateEstimate_ *= problem_.timeManager().timeStepSize(); @@ -374,9 +374,9 @@ public: for (int i=0; i<GET_PROP_VALUE(TypeTag, NumPhases); i++) updateEstimate_[i].resize(problem.gridView().size(0)); - ErrorTermFactor_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, Impet, ErrorTermFactor); - ErrorTermLowerBound_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, Impet, ErrorTermLowerBound); - ErrorTermUpperBound_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, Impet, ErrorTermUpperBound); + ErrorTermFactor_ = getParam<Scalar>("Impet.ErrorTermFactor"); + ErrorTermLowerBound_ = getParam<Scalar>("Impet.ErrorTermLowerBound", 0.2); + ErrorTermUpperBound_ = getParam<Scalar>("Impet.ErrorTermUpperBound"); if (pressureType == Indices::pressureGlobal) { diff --git a/dumux/porousmediumflow/2p2c/sequential/fvtransport.hh b/dumux/porousmediumflow/2p2c/sequential/fvtransport.hh index 8df79415c483b10d40792e78a3cfb965d88149e2..a4bf38ae439b5650159b100cba9319854c845654 100644 --- a/dumux/porousmediumflow/2p2c/sequential/fvtransport.hh +++ b/dumux/porousmediumflow/2p2c/sequential/fvtransport.hh @@ -37,13 +37,6 @@ namespace Dumux { -namespace Properties -{ -NEW_PROP_TAG( TimeManagerSubTimestepVerbosity ); - -SET_INT_PROP(SequentialModel, TimeManagerSubTimestepVerbosity, 0); -} - //! Compositional transport step in a Finite Volume discretization /*! \ingroup multiphase * The finite volume model for the solution of the transport equation for compositional @@ -270,18 +263,18 @@ public: */ FVTransport2P2C(Problem& problem) : totalConcentration_(0.), problem_(problem), - switchNormals(GET_PARAM_FROM_GROUP(TypeTag, bool, Impet, SwitchNormals)), accumulatedDt_(0), + switchNormals(getParam<bool>("Impet.SwitchNormals")), accumulatedDt_(0), dtThreshold_(1e-6), subCFLFactor_(1.0) { - restrictFluxInTransport_ = GET_PARAM_FROM_GROUP(TypeTag,int, Impet, RestrictFluxInTransport); + restrictFluxInTransport_ = getParam<int>("Impet.RestrictFluxInTransport", 0); regulateBoundaryPermeability = GET_PROP_VALUE(TypeTag, RegulateBoundaryPermeability); if(regulateBoundaryPermeability) - minimalBoundaryPermeability = GET_RUNTIME_PARAM(TypeTag, Scalar, SpatialParams.MinBoundaryPermeability); + minimalBoundaryPermeability = getParam<Scalar>("SpatialParams.MinBoundaryPermeability"); - Scalar cFLFactor = GET_PARAM_FROM_GROUP(TypeTag, Scalar, Impet, CFLFactor); + Scalar cFLFactor = getParam<Scalar>("Impet.CFLFactor"); using std::min; - subCFLFactor_ = min(GET_PARAM_FROM_GROUP(TypeTag, Scalar, Impet, SubCFLFactor), cFLFactor); - verbosity_ = GET_PARAM_FROM_GROUP(TypeTag, int, TimeManager, SubTimestepVerbosity); + subCFLFactor_ = min(getParam<Scalar>("Impet.SubCFLFactor"), cFLFactor); + verbosity_ = getParam<int>("TimeManager.SubTimestepVerbosity"); localTimeStepping_ = subCFLFactor_/cFLFactor < 1.0 - dtThreshold_; @@ -501,7 +494,7 @@ void FVTransport2P2C<TypeTag>::update(const Scalar t, Scalar& dt, if(impet) { Dune::dinfo << "Timestep restricted by CellIdx " << restrictingCell << " leads to dt = " - <<dt * GET_PARAM_FROM_GROUP(TypeTag, Scalar, Impet, CFLFactor)<< std::endl; + <<dt * getParam<Scalar>("Impet.CFLFactor")<< std::endl; if (averagedFaces_ != 0) Dune::dinfo << " Averageing done for " << averagedFaces_ << " faces. "<< std::endl; } diff --git a/dumux/porousmediumflow/2p2c/sequential/fvtransportmultiphysics.hh b/dumux/porousmediumflow/2p2c/sequential/fvtransportmultiphysics.hh index cd10c733e4e182b9fabf58bdc4e1775a21642420..115b8a65d6946e32bd2b7a1e1ce809a3b92edda1 100644 --- a/dumux/porousmediumflow/2p2c/sequential/fvtransportmultiphysics.hh +++ b/dumux/porousmediumflow/2p2c/sequential/fvtransportmultiphysics.hh @@ -249,7 +249,7 @@ void FVTransport2P2CMultiPhysics<TypeTag>::update(const Scalar t, Scalar& dt, Tr if(impet) { Dune::dinfo << "Timestep restricted by CellIdx " << restrictingCell << - " leads to dt = "<<dt * GET_PARAM_FROM_GROUP(TypeTag, Scalar, Impet, CFLFactor)<< std::endl; + " leads to dt = "<<dt * getParam<Scalar>("Impet.CFLFactor")<< std::endl; if(this->averagedFaces_ != 0) Dune::dinfo << " Averageing done for " << this->averagedFaces_ << " faces. "<< std::endl; } diff --git a/dumux/porousmediumflow/2p2c/sequential/properties.hh b/dumux/porousmediumflow/2p2c/sequential/properties.hh index e90a8d80eccadefa43b5c729356a8d6b39b1d695..4d05a5af1aa95af650bc329a0816e8c554f401b5 100644 --- a/dumux/porousmediumflow/2p2c/sequential/properties.hh +++ b/dumux/porousmediumflow/2p2c/sequential/properties.hh @@ -72,13 +72,8 @@ NEW_PROP_TAG( VelocityFormulation); //!< The formulation of the model NEW_PROP_TAG( EnableCompressibility); //!< Returns whether compressibility is allowed NEW_PROP_TAG( EnableCapillarity); //!< Returns whether capillarity is regarded NEW_PROP_TAG( BoundaryMobility ); //!< Returns whether mobility or saturation is used for Dirichlet B.C. -NEW_PROP_TAG( ImpetRestrictFluxInTransport ); //!< Restrict flux if direction reverses after pressure equation -NEW_PROP_TAG( ImpetErrorTermFactor ); //!< Damping factor \f$ \alpha \f$ in pressure equation -NEW_PROP_TAG( ImpetErrorTermLowerBound ); //!< Upper bound for regularized error damping -NEW_PROP_TAG( ImpetErrorTermUpperBound ); //!< Lower bound where error is not corrected NEW_PROP_TAG( FluidSystem ); //!< The fluid system NEW_PROP_TAG( FluidState ); //!< The fluid state -NEW_PROP_TAG( ImpetEnableVolumeIntegral ); //!< Enables volume integral in the pressure equation (volume balance formulation) //! A minimum permeability can be assigned via the runtime-Parameter SpatialParams.minBoundaryPermeability NEW_PROP_TAG( RegulateBoundaryPermeability ); }} @@ -144,8 +139,6 @@ SET_PROP(SequentialTwoPTwoC, TransportSolutionType) SET_BOOL_PROP(SequentialTwoPTwoC, EnableCompressibility, true); //!< Compositional models are very likely compressible SET_BOOL_PROP(SequentialTwoPTwoC, VisitFacesOnlyOnce, false); //!< Faces are regarded from both sides SET_BOOL_PROP(SequentialTwoPTwoC, EnableCapillarity, false); //!< Capillarity is enabled -//! Restrict (no upwind) flux in transport step if direction reverses after pressure equation -SET_INT_PROP(SequentialTwoPTwoC, ImpetRestrictFluxInTransport, 0); SET_PROP(SequentialTwoPTwoC, BoundaryMobility) //!< Saturation scales flux on Dirichlet B.C. { static const int value = SequentialTwoPTwoCIndices<TypeTag>::satDependent;}; @@ -159,12 +152,6 @@ SET_TYPE_PROP(SequentialTwoPTwoC, FluidState, TwoPTwoCFluidState<typename GET_PR SET_TYPE_PROP(SequentialTwoPTwoC, SpatialParams, SequentialFVSpatialParams<TypeTag>); //! Switch off permeability regularization at Dirichlet boundaries by default. SET_BOOL_PROP(SequentialTwoPTwoC, RegulateBoundaryPermeability, false); - -SET_BOOL_PROP(SequentialTwoPTwoC, ImpetEnableVolumeIntegral, true); //!< Regard volume integral in pressure equation - -SET_SCALAR_PROP(SequentialTwoPTwoC, ImpetErrorTermFactor, 0.5); //!< Damping factor \f$ \alpha \f$ in pressure equation -SET_SCALAR_PROP(SequentialTwoPTwoC, ImpetErrorTermLowerBound, 0.2); //!< Lower bound where error is not corrected -SET_SCALAR_PROP(SequentialTwoPTwoC, ImpetErrorTermUpperBound, 0.9); //!< Upper bound for regularized error damping } /*! diff --git a/dumux/porousmediumflow/nonequilibrium/volumevariables.hh b/dumux/porousmediumflow/nonequilibrium/volumevariables.hh index 9fe220b7bbc6ab68e607854525629453adc41756..2d20c493acabffafbd7450229a76701fbbccdc6c 100644 --- a/dumux/porousmediumflow/nonequilibrium/volumevariables.hh +++ b/dumux/porousmediumflow/nonequilibrium/volumevariables.hh @@ -632,7 +632,6 @@ public: scv, elemSol); // I know the solid surface from the pore network. But it is more consistent to use the fit value. - // solidSurface_ = GET_RUNTIME_PARAM(TypeTag, Scalar, SpatialParams.soil.specificSolidsurface); solidSurface_ = AnsSurface::interfacialArea(aNonWettingSolidSurfaceParams, materialParams, /*Sw=*/0., pcMax ); Valgrind::CheckDefined(solidSurface_); #endif diff --git a/dumux/porousmediumflow/sequential/cellcentered/mpfa/properties.hh b/dumux/porousmediumflow/sequential/cellcentered/mpfa/properties.hh index bfc93d0e3b646729f34ff53a59908f9be60a51c6..185c2b35d59fcafdc7c166915143b4a09d82d5cf 100644 --- a/dumux/porousmediumflow/sequential/cellcentered/mpfa/properties.hh +++ b/dumux/porousmediumflow/sequential/cellcentered/mpfa/properties.hh @@ -96,12 +96,6 @@ NEW_PROP_TAG( GridImplementation ); //!< Gives kind of grid implementation in fo NEW_PROP_TAG( MPFAInteractionVolume ); //!< Type of the data container for one interaction volume NEW_PROP_TAG( MPFAInteractionVolumeContainer ); //!< Type of the data container for one interaction volume NEW_PROP_TAG( MPFATransmissibilityCalculator ); //!< Type defining the transmissibility calculation -NEW_PROP_TAG( MPFAEnableSimpleLStencil ); //!< Enable use of the two simpler L-shapes (3-d) -NEW_PROP_TAG( MPFAEnableComplexLStencil ); //!< Enable use of the two more complex L-shapes (3-d) -NEW_PROP_TAG( MPFAEnableTPFA );//!< Enable use of TPFA (3-d) -NEW_PROP_TAG( MPFATransmissibilityCriterionThreshold ); //!< Threshold for transmissibility choice -NEW_PROP_TAG( MPFATransmissibilityCriterion ); //!< Choose transmissibility criterion -NEW_PROP_TAG( MPFACalcVelocityInTransport ); //!< Enable facewise velocity calculation in the transport step (less efficient!) } } @@ -122,24 +116,6 @@ public: //! Set grid type indices SET_TYPE_PROP(MPFAProperties, GridTypeIndices, GridTypes); - -//! Allow use of all available L-shapes -SET_BOOL_PROP(MPFAProperties, MPFAEnableSimpleLStencil, true); - -//! Allow use of all available L-shapes -SET_BOOL_PROP(MPFAProperties, MPFAEnableComplexLStencil, true); - -//! Disable use of TPFA -SET_BOOL_PROP(MPFAProperties, MPFAEnableTPFA, false); - -//! Allow use of all available L-shapes -SET_SCALAR_PROP(MPFAProperties, MPFATransmissibilityCriterionThreshold, 1e-8); - -//! Set standard criterion -SET_INT_PROP(MPFAProperties, MPFATransmissibilityCriterion, 0); - -//! Disable facewise velocity calculation per default -SET_BOOL_PROP(MPFAProperties, MPFACalcVelocityInTransport, false); } }// end of Dune namespace #endif diff --git a/dumux/porousmediumflow/sequential/cellcentered/mpfa/velocityintransport.hh b/dumux/porousmediumflow/sequential/cellcentered/mpfa/velocityintransport.hh index b077831b6687bfedbbc5526917d5c6ee697c1e22..86bcef56cea28d7de4ed2ebf070c3f8766dee535 100644 --- a/dumux/porousmediumflow/sequential/cellcentered/mpfa/velocityintransport.hh +++ b/dumux/porousmediumflow/sequential/cellcentered/mpfa/velocityintransport.hh @@ -55,7 +55,7 @@ public: FvMpfaVelocityInTransport(Problem& problem): problem_(problem) { - calcVelocityInTransport_ = GET_PARAM_FROM_GROUP(TypeTag, bool, MPFA, CalcVelocityInTransport); + calcVelocityInTransport_ = getParam<bool>("MPFA.CalcVelocityInTransport"); } //! For initialization diff --git a/dumux/porousmediumflow/sequential/cellcentered/transport.hh b/dumux/porousmediumflow/sequential/cellcentered/transport.hh index 5fcef83f8bf003d3e3812d67aaa08e54a35662a4..196188dfcb238fec6b5028f85134fd59ad1ad4ea 100644 --- a/dumux/porousmediumflow/sequential/cellcentered/transport.hh +++ b/dumux/porousmediumflow/sequential/cellcentered/transport.hh @@ -32,13 +32,6 @@ namespace Dumux { -namespace Properties -{ -NEW_PROP_TAG( TimeManagerSubTimestepVerbosity ); - -SET_INT_PROP(SequentialModel, TimeManagerSubTimestepVerbosity, 0); -} - //! \ingroup IMPET /*!\brief The finite volume discretization of a transport equation * @@ -218,15 +211,15 @@ public: * \param problem A problem class object */ FVTransport(Problem& problem) : - problem_(problem), switchNormals_(GET_PARAM_FROM_GROUP(TypeTag, bool, Impet, SwitchNormals)), + problem_(problem), switchNormals_(getParam<bool>("Impet.SwitchNormals")), subCFLFactor_(1.0), accumulatedDt_(0), dtThreshold_(1e-6) { evalCflFluxFunction_ = std::make_shared<EvalCflFluxFunction>(problem); - Scalar cFLFactor = GET_PARAM_FROM_GROUP(TypeTag, Scalar, Impet, CFLFactor); + Scalar cFLFactor = getParam<Scalar>("Impet.CFLFactor"); using std::min; - subCFLFactor_ = min(GET_PARAM_FROM_GROUP(TypeTag, Scalar, Impet, SubCFLFactor), cFLFactor); - verbosity_ = GET_PARAM_FROM_GROUP(TypeTag, int, TimeManager, SubTimestepVerbosity); + subCFLFactor_ = min(getParam<Scalar>("Impet.SubCFLFactor"), cFLFactor); + verbosity_ = getParam<int>("TimeManager.SubTimestepVerbosity"); localTimeStepping_ = subCFLFactor_/cFLFactor < 1.0 - dtThreshold_; diff --git a/dumux/porousmediumflow/sequential/gridadapt.hh b/dumux/porousmediumflow/sequential/gridadapt.hh index 93fb8a887b40699b1e61c3e97d04de3d8e8e207d..5b4e604c3eeb7c4b1d2be98a7e32b46012ad8c9b 100644 --- a/dumux/porousmediumflow/sequential/gridadapt.hh +++ b/dumux/porousmediumflow/sequential/gridadapt.hh @@ -66,9 +66,9 @@ public: GridAdapt (Problem& problem) : problem_(problem), adaptionIndicator_(problem), marked_(0), coarsened_(0) { - levelMin_ = GET_PARAM_FROM_GROUP(TypeTag, int, GridAdapt, MinLevel); - levelMax_ = GET_PARAM_FROM_GROUP(TypeTag, int, GridAdapt, MaxLevel); - adaptationInterval_ = GET_PARAM_FROM_GROUP(TypeTag, int, GridAdapt, AdaptionInterval); + levelMin_ = getParam<int>("GridAdapt.MinLevel"); + levelMax_ = getParam<int>("GridAdapt.MaxLevel"); + adaptationInterval_ = getParam<int>("GridAdapt.AdaptionInterval", 1); if (levelMin_ < 0) Dune::dgrave << __FILE__<< ":" <<__LINE__ @@ -86,7 +86,7 @@ public: { adaptionIndicator_.init(); - if (!GET_PARAM_FROM_GROUP(TypeTag, bool, GridAdapt, EnableInitializationIndicator)) + if (!getParam<bool>("GridAdapt.EnableInitializationIndicator")) return; AdaptionInitializationIndicator adaptionInitIndicator(problem_, adaptionIndicator_); @@ -440,10 +440,10 @@ private: int marked_; int coarsened_; - int levelMin_; - int levelMax_; + int levelMin_; //!< minimum allowed level + int levelMax_; //!< maximum allowed level - int adaptationInterval_; + int adaptationInterval_; //!< time step interval for adaption }; /*! diff --git a/dumux/porousmediumflow/sequential/gridadaptinitializationindicator.hh b/dumux/porousmediumflow/sequential/gridadaptinitializationindicator.hh index 96e58a045d61019ce6a6ff4bed87bf51d8621503..36a224d25855f12537bcffa764646fb7d93f8a78 100644 --- a/dumux/porousmediumflow/sequential/gridadaptinitializationindicator.hh +++ b/dumux/porousmediumflow/sequential/gridadaptinitializationindicator.hh @@ -370,12 +370,12 @@ public: GridAdaptInitializationIndicator(Problem& problem, AdaptionIndicator& adaptionIndicator): problem_(problem), adaptionIndicator_(adaptionIndicator), maxLevel_(0), nextMaxLevel_(0) { - minAllowedLevel_ = GET_PARAM_FROM_GROUP(TypeTag, int, GridAdapt, MinLevel); - maxAllowedLevel_ = GET_PARAM_FROM_GROUP(TypeTag, int, GridAdapt, MaxLevel); - enableInitializationIndicator_ = GET_PARAM_FROM_GROUP(TypeTag, bool, GridAdapt, EnableInitializationIndicator); - 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); + minAllowedLevel_ = getParam<int>("GridAdapt.MinLevel"); + maxAllowedLevel_ = getParam<int>("GridAdapt.MaxLevel"); + enableInitializationIndicator_ = getParam<bool>("GridAdapt.EnableInitializationIndicator"); + refineAtDirichletBC_ = getParam<bool>("GridAdapt.RefineAtDirichletBC"); + refineAtFluxBC_ = getParam<bool>("GridAdapt.RefineAtFluxBC"); + refineAtSource_ = getParam<bool>("GridAdapt.RefineAtSource"); if (!refineAtDirichletBC_ && !refineAtFluxBC_ && !refineAtSource_) { @@ -390,8 +390,8 @@ private: Dune::DynamicVector<int> indicatorVector_; int maxLevel_; int nextMaxLevel_; - int minAllowedLevel_; - int maxAllowedLevel_; + int minAllowedLevel_; //!< minimum allowed level + int maxAllowedLevel_; //!< maximum allowed level bool enableInitializationIndicator_; bool refineAtDirichletBC_; bool refineAtFluxBC_; diff --git a/dumux/porousmediumflow/sequential/gridadaptinitializationindicatordefault.hh b/dumux/porousmediumflow/sequential/gridadaptinitializationindicatordefault.hh index fade8b8ce39319cfc298c25ea27bfd13a88e7ebd..b582f9abba0ee67be3356dad6a6f98f18e570076 100644 --- a/dumux/porousmediumflow/sequential/gridadaptinitializationindicatordefault.hh +++ b/dumux/porousmediumflow/sequential/gridadaptinitializationindicatordefault.hh @@ -100,11 +100,11 @@ public: */ GridAdaptInitializationIndicatorDefault(Problem& problem, AdaptionIndicator& adaptionIndicator) { - maxLevel_ = GET_PARAM_FROM_GROUP(TypeTag, int, GridAdapt, MaxLevel); + maxLevel_ = getParam<int>("GridAdapt.MaxLevel"); } private: - int maxLevel_; + int maxLevel_; //!< maximum allowed level }; } diff --git a/dumux/porousmediumflow/sequential/gridadaptproperties.hh b/dumux/porousmediumflow/sequential/gridadaptproperties.hh index 8c54e1b57947d8e174d14a0c48a07c9707005917..9c7e6eec93a2abede76a3b5a42a2834eee3109c2 100644 --- a/dumux/porousmediumflow/sequential/gridadaptproperties.hh +++ b/dumux/porousmediumflow/sequential/gridadaptproperties.hh @@ -57,39 +57,12 @@ NEW_PROP_TAG(AdaptionIndicator); //! Class defining the refinement/coarsening indicator for grid initialization NEW_PROP_TAG(AdaptionInitializationIndicator); -//! Switch the use of initial grid adaption on/off -NEW_PROP_TAG(GridAdaptEnableInitializationIndicator); - -//! Mimimum allowed level -NEW_PROP_TAG(GridAdaptMinLevel); - -//! Maximum allowed level -NEW_PROP_TAG(GridAdaptMaxLevel); - -//! Tolerance for refinement -NEW_PROP_TAG(GridAdaptRefineTolerance); - -//! Tolerance for coarsening -NEW_PROP_TAG(GridAdaptCoarsenTolerance); - //! Tolerance for refinement NEW_PROP_TAG(GridAdaptRefineThreshold); //! Tolerance for coarsening NEW_PROP_TAG(GridAdaptCoarsenThreshold); -//! Time step interval for adaption -NEW_PROP_TAG(GridAdaptAdaptionInterval); - -//! Switch for refinement at Dirichlet BC's -> not used by all indicators! -NEW_PROP_TAG(GridAdaptRefineAtDirichletBC); - -//! Switch for refinement at Neumann BC's -> not used by all indicators! -NEW_PROP_TAG(GridAdaptRefineAtFluxBC); - -//! Switch for refinement at sources -> not used by all indicators! -NEW_PROP_TAG(GridAdaptRefineAtSource); - //no adaptive grid SET_BOOL_PROP(GridAdaptTypeTag, AdaptiveGrid, false); @@ -100,20 +73,8 @@ SET_TYPE_PROP(GridAdaptTypeTag, GridAdaptModel, GridAdapt<TypeTag, GET_PROP_VAL //standard setting -SET_INT_PROP(GridAdaptTypeTag, GridAdaptMinLevel, 0); -SET_INT_PROP(GridAdaptTypeTag, GridAdaptMaxLevel, 1); -SET_SCALAR_PROP(GridAdaptTypeTag, GridAdaptRefineTolerance, 0.05); -SET_SCALAR_PROP(GridAdaptTypeTag, GridAdaptCoarsenTolerance, 0.001); SET_SCALAR_PROP(GridAdaptTypeTag, GridAdaptRefineThreshold, 0.0); SET_SCALAR_PROP(GridAdaptTypeTag, GridAdaptCoarsenThreshold, 0.0); -SET_INT_PROP(GridAdaptTypeTag, GridAdaptAdaptionInterval, 1); -//Switch initial grid adaption off per default -SET_BOOL_PROP(GridAdaptTypeTag, GridAdaptEnableInitializationIndicator, false); - -// Switch of extra refinement strategy at boundaries/sources -SET_BOOL_PROP(GridAdaptTypeTag, GridAdaptRefineAtDirichletBC, false); -SET_BOOL_PROP(GridAdaptTypeTag, GridAdaptRefineAtFluxBC, false); -SET_BOOL_PROP(GridAdaptTypeTag, GridAdaptRefineAtSource, false); } // namespace Properties } // namespace Dumux diff --git a/dumux/porousmediumflow/sequential/impet.hh b/dumux/porousmediumflow/sequential/impet.hh index c9f179888e726b9d79b369fb9cdbf00551392b09..83e79ab1a2db5ac19d1addc0c5e1ebb9831fc54e 100644 --- a/dumux/porousmediumflow/sequential/impet.hh +++ b/dumux/porousmediumflow/sequential/impet.hh @@ -209,20 +209,20 @@ public: IMPET(Problem& problem) : problem_(problem) { - cFLFactor_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, Impet, CFLFactor); - iterFlag_ = GET_PARAM_FROM_GROUP(TypeTag, int, Impet, IterationFlag); - nIter_ = GET_PARAM_FROM_GROUP(TypeTag, int, Impet, IterationNumber); - maxDefect_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, Impet, MaximumDefect); - omega_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, Impet, RelaxationFactor); + cFLFactor_ = getParam<Scalar>("Impet.CFLFactor"); + iterFlag_ = getParam<int>("Impet.IterationFlag", 0); + nIter_ = getParam<int>("Impet.IterationNumber", 2); + maxDefect_ = getParam<Scalar>("Impet.MaximumDefect", 1e-5); + omega_ = getParam<Scalar>("Impet.RelaxationFactor", 1.0); } private: Problem& problem_; //!< object of type Problem including problem Scalar cFLFactor_; - int iterFlag_; - int nIter_; - Scalar maxDefect_; - Scalar omega_; + int iterFlag_; //!< flag to switch the iteration type of the IMPET scheme + int nIter_; //!< number of iterations if IMPET iterations are enabled by IterationFlag + Scalar maxDefect_; //!< maximum defect if IMPET iterations are enabled by IterationFlag + Scalar omega_; //!< 1 = new solution is new solution, 0 = old solution is new solution }; } #endif diff --git a/dumux/porousmediumflow/sequential/impetproblem.hh b/dumux/porousmediumflow/sequential/impetproblem.hh index 37f39224bd79380ba0583ad0f04a2344853e0490..055b24ab65b51038f354f501669d393d7e491db4 100644 --- a/dumux/porousmediumflow/sequential/impetproblem.hh +++ b/dumux/porousmediumflow/sequential/impetproblem.hh @@ -133,7 +133,7 @@ public: gridAdapt_ = std::make_shared<GridAdaptModel>(asImp_()); vtkOutputLevel_ = getParam<int>("Vtk.OutputLevel"); - dtVariationRestrictionFactor_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, Impet, DtVariationRestrictionFactor); + dtVariationRestrictionFactor_ = getParam<Scalar>("Impet.DtVariationRestrictionFactor", std::numeric_limits<Scalar>::max()); maxTimeStepSize_ = getParam<Scalar>("TimeManager.MaxTimeStepSize", std::numeric_limits<Scalar>::max()); } diff --git a/dumux/porousmediumflow/sequential/impetproperties.hh b/dumux/porousmediumflow/sequential/impetproperties.hh index 507fbf8dac118102a03e9fbc21ec6cc633c21e6b..04ef01a6fdcad0d7bfa54636dca516b43ec852fc 100644 --- a/dumux/porousmediumflow/sequential/impetproperties.hh +++ b/dumux/porousmediumflow/sequential/impetproperties.hh @@ -53,21 +53,8 @@ namespace Properties //! The type tag for models based on the diffusion-scheme NEW_TYPE_TAG(IMPET, INHERITS_FROM(SequentialModel)); -////////////////////////////////////////////////////////////////// -// Property tags -////////////////////////////////////////////////////////////////// - -NEW_PROP_TAG(ImpetCFLFactor); //!< Scalar factor for additional scaling of the time step -NEW_PROP_TAG(ImpetSubCFLFactor);//!< Scalar factor for scaling of local sub-time-step -NEW_PROP_TAG(ImpetIterationFlag); //!< Flag to switch the iteration type of the IMPET scheme -NEW_PROP_TAG(ImpetIterationNumber); //!< Number of iterations if IMPET iterations are enabled by the IterationFlags -NEW_PROP_TAG(ImpetMaximumDefect); //!< Maximum Defect if IMPET iterations are enabled by the IterationFlags -NEW_PROP_TAG(ImpetRelaxationFactor); //!< Used for IMPET iterations -NEW_PROP_TAG(ImpetDtVariationRestrictionFactor); -NEW_PROP_TAG(ImpetPorosityThreshold); - -//forward declaration! -NEW_PROP_TAG( Model );//! The model of the specific problem +//forward declaration +NEW_PROP_TAG( Model ); //!< The model of the specific problem } } @@ -79,18 +66,6 @@ namespace Properties { //set impet model SET_TYPE_PROP(IMPET, Model, IMPET<TypeTag>); - -//Set defaults -SET_SCALAR_PROP(IMPET, ImpetSubCFLFactor, 1.0); -SET_SCALAR_PROP(IMPET, ImpetCFLFactor, 1.0); -//! 0 = no iterations, 1 = iterate IterationNumber iterations, 2 = iterate until converged or IterationNumber is reached -SET_INT_PROP(IMPET, ImpetIterationFlag, 0); -SET_INT_PROP(IMPET, ImpetIterationNumber, 2); -SET_SCALAR_PROP(IMPET, ImpetMaximumDefect, 1e-5); -//! 1 = new solution is new solution, 0 = old solution is new solution -SET_SCALAR_PROP(IMPET, ImpetRelaxationFactor, 1.0); -SET_SCALAR_PROP(IMPET, ImpetDtVariationRestrictionFactor, std::numeric_limits<double>::max()); -SET_SCALAR_PROP(IMPET, ImpetPorosityThreshold, 1e-6); } } diff --git a/dumux/porousmediumflow/sequential/properties.hh b/dumux/porousmediumflow/sequential/properties.hh index 7b8a393d3e41f632b19ef094c46909dd5c41a0a2..e78968427957d84f4090663f2705007b558f2cf3 100644 --- a/dumux/porousmediumflow/sequential/properties.hh +++ b/dumux/porousmediumflow/sequential/properties.hh @@ -216,8 +216,31 @@ SET_PROP(SequentialModel, ModelDefaultParameters) { static void defaultParams(Dune::ParameterTree& params, const std::string& group = "") { - params["Vtk.OutputLevel"] = "0"; - + params["GridAdapt.CoarsenTolerance"] = "0.001"; //!< tolerance for coarsening + params["GridAdapt.EnableInitializationIndicator"] = "false"; //!< switch for using initial grid adaption + params["GridAdapt.EnableMultiPointFluxApproximation"] = "true"; //!< apply an mpfa method around hanging nodes + params["GridAdapt.MaxLevel"] = "1"; //!< maximum allowed level + params["GridAdapt.MaxInteractionVolumes"] = "4"; //!< use up to four interaction regions + params["GridAdapt.MinLevel"] = "0"; //!< minimum allowed level + params["GridAdapt.RefineAtDirichletBC"] = "false"; //!< switch for refinement at Dirichlet BCs + params["GridAdapt.RefineAtFluxBC"] = "false"; //!< switch for refinement at Neumann BCs + params["GridAdapt.RefineAtSource"] = "false"; //!< switch for refinement at sources + params["GridAdapt.RefineTolerance"] = "0.05"; //!< tolerance for refinement + + params["Impet.CFLFactor"] = "1.0"; //!< scalar factor for additional scaling of the time step + params["Impet.EnableVolumeIntegral"] = "true"; //!< regard volume integral in pressure equation + params["Impet.ErrorTermFactor"] = "0.5"; //!< scaling factor for the error term + params["Impet.ErrorTermLowerBound"] = "0.1"; //!< lower threshold used for the error term evaluation + params["Impet.ErrorTermUpperBound"] = "0.9"; //!< upper threshold used for the error term evaluation + params["Impet.PorosityThreshold"] = "1e-6"; //!< porosity will be set to max(given value, threshold) + params["Impet.SubCFLFactor"] = "1.0"; //!< scalar factor for scaling of local sub-time-step + params["Impet.SwitchNormals"] = "false"; //!< don't switch direction of face normal vectors + + params["MPFA.CalcVelocityInTransport"] = "false"; //!< disable facewise velocity calculation + + params["TimeManager.SubTimestepVerbosity"] = "0"; //!< don't be verbose in local sub-time-steps + + params["Vtk.OutputLevel"] = "0"; //!< VTK output contains only the basic values } }; diff --git a/dumux/porousmediumflow/sequential/transportproperties.hh b/dumux/porousmediumflow/sequential/transportproperties.hh index dec294c16e1041288d6e4213155de3107af0f765..5b4dd6ebc258aa2fc7f0fae1cace7b92eddc317a 100644 --- a/dumux/porousmediumflow/sequential/transportproperties.hh +++ b/dumux/porousmediumflow/sequential/transportproperties.hh @@ -48,16 +48,6 @@ NEW_TYPE_TAG(Transport, INHERITS_FROM(SequentialModel)); ////////////////////////////////////////////////////////////////// NEW_PROP_TAG(TransportSolutionType); NEW_PROP_TAG(EvalCflFluxFunction); //!< Type of the evaluation of the CFL-condition -NEW_PROP_TAG(ImpetCFLFactor); -NEW_PROP_TAG(ImpetSubCFLFactor); -NEW_PROP_TAG(ImpetSwitchNormals); -NEW_PROP_TAG(ImpetPorosityThreshold); -NEW_PROP_TAG(ImpetDtVariationRestrictionFactor); - -SET_SCALAR_PROP(Transport, ImpetCFLFactor, 1.0); -SET_SCALAR_PROP(Transport, ImpetSubCFLFactor, 1.0); - -SET_BOOL_PROP(Transport, ImpetSwitchNormals, false); /*! * \brief Default implementation for the Vector of the transportet quantity @@ -74,8 +64,6 @@ SET_PROP(Transport, TransportSolutionType) public: using type = typename SolutionType::ScalarSolution;//!<type for vector of scalar properties }; -SET_SCALAR_PROP(Transport, ImpetDtVariationRestrictionFactor, std::numeric_limits<double>::max()); -SET_SCALAR_PROP(Transport, ImpetPorosityThreshold, 1e-6); } } diff --git a/test/porousmediumflow/2p/sequential/test_3d2p.input b/test/porousmediumflow/2p/sequential/test_3d2p.input index 7eeb5250c5be6f888039c0f7f843e0d7e88e4b63..f01c863edfc35378dd65e16449c9189616a72234 100644 --- a/test/porousmediumflow/2p/sequential/test_3d2p.input +++ b/test/porousmediumflow/2p/sequential/test_3d2p.input @@ -18,7 +18,7 @@ OutputInterval = 0 OutputTimeInterval = 1e3 [Impet] -#CFLFactor = 5.0 +CFLFactor = 0.95 #SubCFLFactor = 0.8 [GridAdapt] diff --git a/test/porousmediumflow/2p/sequential/test_3d2pproblem.hh b/test/porousmediumflow/2p/sequential/test_3d2pproblem.hh index 000b5816042b0084db3c612e0719318a77ac9814..a3d869cfb2ab05c630e139b33de3e9341849be6b 100644 --- a/test/porousmediumflow/2p/sequential/test_3d2pproblem.hh +++ b/test/porousmediumflow/2p/sequential/test_3d2pproblem.hh @@ -94,9 +94,6 @@ public: #if PROBLEM == 1 SET_TYPE_PROP(ThreeDTwoPTestProblem, EvalCflFluxFunction, EvalCflFluxCoats<TypeTag>); -SET_SCALAR_PROP(ThreeDTwoPTestProblem, ImpetCFLFactor, 1.0); -#else -SET_SCALAR_PROP(ThreeDTwoPTestProblem, ImpetCFLFactor, 0.95); #endif SET_TYPE_PROP(ThreeDTwoPTestProblem, AdaptionIndicator, GridAdaptionIndicator2PLocal<TypeTag>); @@ -175,7 +172,7 @@ ParentType(timeManager, gridView), inflowEdge_(0), outflowEdge_(0) int refinementFactor = 0; if (haveParam("Grid.RefinementFactor") && !GET_PROP_VALUE(TypeTag, AdaptiveGrid)) { - refinementFactor = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, RefinementFactor); + refinementFactor = getParam<Scalar>("Grid.RefinementFactor"); this->grid().globalRefine(refinementFactor); } @@ -202,14 +199,14 @@ ParentType(timeManager, gridView), inflowEdge_(0), outflowEdge_(0) int outputInterval = 0; if (haveParam("Problem.OutputInterval")) { - outputInterval = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, int, Problem, OutputInterval); + outputInterval = getParam<int>("Problem.OutputInterval"); } this->setOutputInterval(outputInterval); Scalar outputTimeInterval = 1e6; if (haveParam("Problem.OutputTimeInterval")) { - outputTimeInterval = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Problem, OutputTimeInterval); + outputTimeInterval = getParam<Scalar>("Problem.OutputTimeInterval"); } this->setOutputTimeInterval(outputTimeInterval); } @@ -226,10 +223,7 @@ ParentType(timeManager, gridView), inflowEdge_(0), outflowEdge_(0) */ std::string name() const { - if (haveParam("Problem.OutputName")) - return GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, std::string, Problem, OutputName); - else - return "test_3d2p"; + return getParam<std::string>("Problem.OutputName", "test_3d2p"); } bool shouldWriteRestartFile() const diff --git a/test/porousmediumflow/2p/sequential/test_impesadaptive.input b/test/porousmediumflow/2p/sequential/test_impesadaptive.input index 9949efaa394e1612a39a89786a3c31b35a784d60..680ec5f01cef6e70b8267a4533fb4f65446452e2 100644 --- a/test/porousmediumflow/2p/sequential/test_impesadaptive.input +++ b/test/porousmediumflow/2p/sequential/test_impesadaptive.input @@ -6,6 +6,9 @@ DtInitial = 0 # [s] Name = test_2padaptive # name passed to the output routines EnableGravity = 0 +[Impet] +CFLFactor = 0.95 + [Grid] Cells = 2 1 diff --git a/test/porousmediumflow/2p/sequential/test_impesadaptiveproblem.hh b/test/porousmediumflow/2p/sequential/test_impesadaptiveproblem.hh index 28e05659263224c269c0fec4e2bd11d549081804..1fdabea8dfdb8e5f71df8908ab3bc3419ccaec25 100644 --- a/test/porousmediumflow/2p/sequential/test_impesadaptiveproblem.hh +++ b/test/porousmediumflow/2p/sequential/test_impesadaptiveproblem.hh @@ -67,8 +67,6 @@ SET_PROP(TestIMPESAdaptiveProblem, FluidSystem) using NonwettingPhase = FluidSystems::LiquidPhase<Scalar, SimpleH2O<Scalar> >; using type = FluidSystems::TwoPImmiscible<Scalar, WettingPhase, NonwettingPhase>; }; - -SET_SCALAR_PROP(TestIMPESAdaptiveProblem, ImpetCFLFactor, 0.95); } /*! @@ -124,7 +122,7 @@ public: TestIMPESAdaptiveProblem(TimeManager &timeManager, const GridView &gridView) : ParentType(timeManager, gridView) { - name_ = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, std::string, Problem, Name); + name_ = getParam<std::string>("Problem.Name"); // Refine the grid provided that no restart occurs. Otherwise, an // already refined grid will be read. diff --git a/test/porousmediumflow/2p/sequential/test_impesproblem.hh b/test/porousmediumflow/2p/sequential/test_impesproblem.hh index 4716fb6ef8012b5ac8aa4488894f5c246b4e2e54..c7cf63dc907f588f47e314a8c0575382d94251e3 100644 --- a/test/porousmediumflow/2p/sequential/test_impesproblem.hh +++ b/test/porousmediumflow/2p/sequential/test_impesproblem.hh @@ -155,7 +155,7 @@ public: IMPESTestProblem(TimeManager &timeManager, const GridView &gridView) : ParentType(timeManager, gridView) { - name_ = GET_RUNTIME_PARAM(TypeTag, std::string, Problem.Name); + name_ = getParam<std::string>("Problem.Name"); } /*! diff --git a/test/porousmediumflow/2p/sequential/test_mpfa2p.input b/test/porousmediumflow/2p/sequential/test_mpfa2p.input index 5e6f14ced4b6f48909226f2a48b9c48bb61da806..06db365c9ed701ebae8abacfb6c29d69d407f9b8 100644 --- a/test/porousmediumflow/2p/sequential/test_mpfa2p.input +++ b/test/porousmediumflow/2p/sequential/test_mpfa2p.input @@ -19,7 +19,7 @@ InletWidth = 2 InjectionFlux = 0.1 [Impet] -#CFLFactor = 10.0 # Use larger time steps and +CFLFactor = 1.0 #SubCFLFactor = 0.95 # enable local time-stepping [Vtk] diff --git a/test/porousmediumflow/2p/sequential/test_mpfa2pproblem.hh b/test/porousmediumflow/2p/sequential/test_mpfa2pproblem.hh index 81ae9df601e27cebc4570535747cb4cc16500442..df4c6c8e0c5bd9d60490289d669319ab0396a717 100644 --- a/test/porousmediumflow/2p/sequential/test_mpfa2pproblem.hh +++ b/test/porousmediumflow/2p/sequential/test_mpfa2pproblem.hh @@ -87,7 +87,6 @@ SET_INT_PROP(MPFATwoPTestProblem, Formulation, SequentialTwoPCommonIndices::pnsw #endif SET_TYPE_PROP(MPFATwoPTestProblem, EvalCflFluxFunction, EvalCflFluxCoats<TypeTag>); -SET_SCALAR_PROP(MPFATwoPTestProblem, ImpetCFLFactor, 1.0); SET_TYPE_PROP(MPFATwoPTestProblem, AdaptionIndicator, GridAdaptionIndicator2PLocal<TypeTag>); NEW_TYPE_TAG(FVTwoPTestProblem, INHERITS_FROM(FVPressureTwoP, FVTransportTwoP, IMPESTwoP, MPFATwoPTestProblem)); @@ -171,19 +170,10 @@ ParentType(timeManager, gridView) { this->setGrid(GridCreator::grid()); - int refinementFactor = 0; - if (haveParam("Grid.RefinementFactor")) - { - refinementFactor = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, RefinementFactor); - } - + int refinementFactor = getParam<Scalar>("Grid.RefinementFactor", 0); this->grid().globalRefine(refinementFactor); - Scalar inletWidth = 1.0; - if (haveParam("Problem.InletWidth")) - { - inletWidth = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Problem, InletWidth); - } + Scalar inletWidth = getParam<Scalar>("Problem.InletWidth", 1.0); GlobalPosition inletCenter = this->bBoxMax(); inletCenter[0] *= 0.5; @@ -192,24 +182,12 @@ ParentType(timeManager, gridView) inletRightCoord_ = inletCenter; inletRightCoord_[0] +=0.5*inletWidth; - inFlux_ = 1e-4; - if (haveParam("Problem.InjectionFlux")) - { - inFlux_ = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Problem, InjectionFlux); - } + inFlux_ = getParam<Scalar>("Problem.InjectionFlux", 1e-4); - int outputInterval = 0; - if (haveParam("Problem.OutputInterval")) - { - outputInterval = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, int, Problem, OutputInterval); - } + int outputInterval = getParam<int>("Problem.OutputInterval", 0); this->setOutputInterval(outputInterval); - Scalar outputTimeInterval = 1e6; - if (haveParam("Problem.OutputTimeInterval")) - { - outputTimeInterval = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Problem, OutputTimeInterval); - } + Scalar outputTimeInterval = getParam<Scalar>("Problem.OutputTimeInterval", 1e6); this->setOutputTimeInterval(outputTimeInterval); } diff --git a/test/porousmediumflow/2p/sequential/test_mpfa2pspatialparams.hh b/test/porousmediumflow/2p/sequential/test_mpfa2pspatialparams.hh index 86907deaa7c15a0bb96dec5488083b07ebd56728..270cb96950796e93d6bfd4b1a4d46b11f5643e47 100644 --- a/test/porousmediumflow/2p/sequential/test_mpfa2pspatialparams.hh +++ b/test/porousmediumflow/2p/sequential/test_mpfa2pspatialparams.hh @@ -155,36 +155,18 @@ public: //parameters for Brooks-Corey law - // entry pressures function - materialLawParamsBackground_.setPe(0.); - if (haveParam("SpatialParams.BackgroundEntryPressure")) - { - materialLawParamsBackground_.setPe(GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, BackgroundEntryPressure)); - } - - materialLawParamsLenses_.setPe(0.); - if (haveParam("SpatialParams.LenseEntryPressure")) - { - materialLawParamsLenses_.setPe(GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, LenseEntryPressure)); - } + // entry pressures + materialLawParamsBackground_.setPe(getParam<Scalar>("SpatialParams.BackgroundEntryPressure", 0.0)); + materialLawParamsLenses_.setPe(getParam<Scalar>("SpatialParams.LenseEntryPressure", 0.0)); #endif // Brooks-Corey shape parameters - #if PROBLEM == 2 - materialLawParamsBackground_.setLambda(3); - if (haveParam("SpatialParams.BackgroundLambda")) - { - materialLawParamsBackground_.setLambda(GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, BackgroundLambda)); - } - materialLawParamsLenses_.setLambda(2); - if (haveParam("SpatialParams.LenseLambda")) - { - materialLawParamsLenses_.setLambda(GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, LenseLambda)); - } + materialLawParamsBackground_.setLambda(getParam<Scalar>("SpatialParams.BackgroundLambda", 3.0)); + materialLawParamsLenses_.setLambda(getParam<Scalar>("SpatialParams.LenseLambda", 2.0)); #else - materialLawParamsBackground_.setLambda(2); - materialLawParamsLenses_.setLambda(2); + materialLawParamsBackground_.setLambda(2.0); + materialLawParamsLenses_.setLambda(2.0); #endif #if PROBLEM == 0 @@ -192,84 +174,27 @@ public: permBackground_[1][1] = 1e-7; permLenses_[0][0] = 1e-7; permLenses_[1][1] = 1e-7; -#else +#elif PROBLEM == 1 permBackground_[0][0] = 1e-10; permBackground_[1][1] = 1e-10; permLenses_[0][0] = 1e-10; permLenses_[1][1] = 1e-10; -#endif - - -#if PROBLEM == 2 - if (haveParam("SpatialParams.BackgroundPermeabilityXX")) - { - permBackground_[0][0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, BackgroundPermeabilityXX); - } - if (haveParam("SpatialParams.BackgroundPermeabilityXY")) - { - permBackground_[0][1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, BackgroundPermeabilityXY); - } - if (haveParam("SpatialParams.BackgroundPermeabilityYX")) - { - permBackground_[1][0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, BackgroundPermeabilityYX); - } - if (haveParam("SpatialParams.BackgroundPermeabilityYY")) - { - permBackground_[1][1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, BackgroundPermeabilityYY); - } - - if (haveParam("SpatialParams.LensPermeabilityXX")) - { - permLenses_[0][0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, LensPermeabilityXX); - } - if (haveParam("SpatialParams.LensPermeabilityXY")) - { - permLenses_[0][1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, LensPermeabilityXY); - } - if (haveParam("SpatialParams.LensPermeabilityYX")) - { - permLenses_[1][0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, LensPermeabilityYX); - } - if (haveParam("SpatialParams.LensPermeabilityYY")) - { - permLenses_[1][1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, LensPermeabilityYY); - } - - if (haveParam("SpatialParams.LensOneLowerLeft")) - { - lensOneLowerLeft_[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, GlobalPosition, SpatialParams, LensOneLowerLeft)[0]; - lensOneLowerLeft_[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, GlobalPosition, SpatialParams, LensOneLowerLeft)[1]; - } - - if (haveParam("SpatialParams.LensOneUpperRight")) - { - lensOneUpperRight_[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, GlobalPosition, SpatialParams, LensOneUpperRight)[0]; - lensOneUpperRight_[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, GlobalPosition, SpatialParams, LensOneUpperRight)[1]; - } - - if (haveParam("SpatialParams.LensTwoLowerLeft")) - { - lensTwoLowerLeft_[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, GlobalPosition, SpatialParams, LensTwoLowerLeft)[0]; - lensTwoLowerLeft_[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, GlobalPosition, SpatialParams, LensTwoLowerLeft)[1]; - } - - if (haveParam("SpatialParams.LensTwoUpperRight")) - { - lensTwoUpperRight_[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, GlobalPosition, SpatialParams, LensTwoUpperRight)[0]; - lensTwoUpperRight_[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, GlobalPosition, SpatialParams, LensTwoUpperRight)[1]; - } - - if (haveParam("SpatialParams.LensThreeLowerLeft")) - { - lensThreeLowerLeft_[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, GlobalPosition, SpatialParams, LensThreeLowerLeft)[0]; - lensThreeLowerLeft_[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, GlobalPosition, SpatialParams, LensThreeLowerLeft)[1]; - } - - if (haveParam("SpatialParams.LensThreeUpperRight")) - { - lensThreeUpperRight_[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, GlobalPosition, SpatialParams, LensThreeUpperRight)[0]; - lensThreeUpperRight_[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, GlobalPosition, SpatialParams, LensThreeUpperRight)[1]; - } +#else + permBackground_[0][0] = getParam<Scalar>("SpatialParams.BackgroundPermeabilityXX", 1e-10); + permBackground_[0][1] = getParam<Scalar>("SpatialParams.BackgroundPermeabilityXY", 0.0); + permBackground_[1][0] = getParam<Scalar>("SpatialParams.BackgroundPermeabilityYX", 0.0); + permBackground_[1][1] = getParam<Scalar>("SpatialParams.BackgroundPermeabilityYY", 1e-10); + permLenses_[0][0] = getParam<Scalar>("SpatialParams.LensPermeabilityXX", 1e-10); + permLenses_[0][1] = getParam<Scalar>("SpatialParams.LensPermeabilityXY", 0.0); + permLenses_[1][0] = getParam<Scalar>("SpatialParams.LensPermeabilityYX", 0.0); + permLenses_[1][1] = getParam<Scalar>("SpatialParams.LensPermeabilityYY", 1e-10); + + lensOneLowerLeft_ = getParam<GlobalPosition>("SpatialParams.LensOneLowerLeft", GlobalPosition(0.0)); + lensOneUpperRight_ = getParam<GlobalPosition>("SpatialParams.LensOneUpperRight", GlobalPosition(0.0)); + lensTwoLowerLeft_ = getParam<GlobalPosition>("SpatialParams.LensTwoLowerLeft", GlobalPosition(0.0)); + lensTwoUpperRight_ = getParam<GlobalPosition>("SpatialParams.LensTwoUpperRight", GlobalPosition(0.0)); + lensThreeLowerLeft_ = getParam<GlobalPosition>("SpatialParams.LensThreeLowerLeft", GlobalPosition(0.0)); + lensThreeUpperRight_ = getParam<GlobalPosition>("SpatialParams.LensThreeUpperRight", GlobalPosition(0.0)); #endif } diff --git a/test/porousmediumflow/2p2c/sequential/test_adaptive2p2c2dproblem.hh b/test/porousmediumflow/2p2c/sequential/test_adaptive2p2c2dproblem.hh index f098d2c2ad99639a8960997982575d4cb8f801d1..fb3ca409a11380baf421ac0103534e784700ea01 100644 --- a/test/porousmediumflow/2p2c/sequential/test_adaptive2p2c2dproblem.hh +++ b/test/porousmediumflow/2p2c/sequential/test_adaptive2p2c2dproblem.hh @@ -133,8 +133,8 @@ Adaptive2p2c2d(TimeManager &timeManager, const GridView& gridView) : debugWriter_(gridView, "gridAfterAdapt") { this->setGrid(GridCreator::grid()); - this->setName(GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, std::string, Problem, SimulationName)); - this->setOutputInterval(GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, int, Problem, OutputInterval)); + this->setName(getParam<std::string>("Problem.SimulationName")); + this->setOutputInterval(getParam<int>("Problem.OutputInterval")); } /*! diff --git a/test/porousmediumflow/2p2c/sequential/test_adaptive2p2c3dproblem.hh b/test/porousmediumflow/2p2c/sequential/test_adaptive2p2c3dproblem.hh index d006ac41516f6aa5e7543e4f4e53fdcd54f702c2..8aa9e7099a2b39c41ebe301327b679fafbc60ea9 100644 --- a/test/porousmediumflow/2p2c/sequential/test_adaptive2p2c3dproblem.hh +++ b/test/porousmediumflow/2p2c/sequential/test_adaptive2p2c3dproblem.hh @@ -132,15 +132,15 @@ Adaptive2p2c3d(TimeManager &timeManager, const GridView& gridView) : ParentType(timeManager, gridView), debugWriter_(gridView, "gridAfterAdapt") { - GridCreator::grid().globalRefine(GET_PARAM_FROM_GROUP(TypeTag, int, GridAdapt, MaxLevel)); + GridCreator::grid().globalRefine(getParam<int>("GridAdapt.MaxLevel")); this->setGrid(GridCreator::grid()); //Process parameter file //Simulation Control - const int outputInterval = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, int, Problem, OutputInterval); + const int outputInterval = getParam<int>("Problem.OutputInterval"); this->setOutputInterval(outputInterval); - injectionrate_ = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, double, BoundaryConditions, Injectionrate); + injectionrate_ = getParam<Scalar>("BoundaryConditions.Injectionrate"); } /*! @@ -150,7 +150,7 @@ Adaptive2p2c3d(TimeManager &timeManager, const GridView& gridView) : //! @copydoc TestDecTwoPTwoCProblem::name() std::string name() const { - return GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, std::string, Problem, Name); + return getParam<std::string>("Problem.Name"); } //! @copydoc TestDecTwoPTwoCProblem::shouldWriteRestartFile() diff --git a/test/porousmediumflow/2p2c/sequential/test_multiphysics2p2c.input b/test/porousmediumflow/2p2c/sequential/test_multiphysics2p2c.input index a68b7055b4a4110789e4aff5746dc781f0199f0e..9406be6ca6a3cd38874bb302a556cba5e7f2474b 100644 --- a/test/porousmediumflow/2p2c/sequential/test_multiphysics2p2c.input +++ b/test/porousmediumflow/2p2c/sequential/test_multiphysics2p2c.input @@ -1,3 +1,6 @@ +[Impet] +CFLFactor = 0.8 + [Vtk] OutputLevel = 2 diff --git a/test/porousmediumflow/2p2c/sequential/test_multiphysics2p2cproblem.hh b/test/porousmediumflow/2p2c/sequential/test_multiphysics2p2cproblem.hh index 3bf316b640dcf8dcbe105ffa606c59d1b9954bcc..f9454f15e1642d1d0d264eadee861c502371bd33 100644 --- a/test/porousmediumflow/2p2c/sequential/test_multiphysics2p2cproblem.hh +++ b/test/porousmediumflow/2p2c/sequential/test_multiphysics2p2cproblem.hh @@ -72,7 +72,6 @@ SET_PROP(TestMultTwoPTwoCProblem, FluidSystem) SET_BOOL_PROP(TestMultTwoPTwoCProblem, EnableCapillarity, true); SET_INT_PROP(TestMultTwoPTwoCProblem, BoundaryMobility, GET_PROP_TYPE(TypeTag, Indices)::satDependent); -SET_SCALAR_PROP(TestMultTwoPTwoCProblem, ImpetCFLFactor, 0.8); } /*!