diff --git a/test/freeflow/navierstokes/navierstokestestproblem.hh b/test/freeflow/navierstokes/navierstokestestproblem.hh index afe4ef91d06cd15185355d80111a591b17cf91b4..ab468207239f3265279ea65f8d71aaeb756c8dab 100644 --- a/test/freeflow/navierstokes/navierstokestestproblem.hh +++ b/test/freeflow/navierstokes/navierstokestestproblem.hh @@ -111,9 +111,7 @@ namespace Dumux public: NavierStokesTestProblem(TimeManager &timeManager, const GridView &gridView) : ParentType(timeManager, gridView) - { - eps_ = 1e-6; - } + {} /** * \name Problem parameters @@ -280,7 +278,7 @@ namespace Dumux return globalPos[1] > this->bBoxMax()[1] - eps_; } - Scalar eps_; + static constexpr Scalar eps_ = 1e-6; }; } //end namespace diff --git a/test/freeflow/stokes/stokestestproblem.hh b/test/freeflow/stokes/stokestestproblem.hh index 6a36015c2e0d041dc6e4b875925b0014220fc650..dc79c2ec8abcc381c4ae449abd6d477e6e3dff98 100644 --- a/test/freeflow/stokes/stokestestproblem.hh +++ b/test/freeflow/stokes/stokestestproblem.hh @@ -112,9 +112,7 @@ class StokesTestProblem : public StokesProblem<TypeTag> public: StokesTestProblem(TimeManager &timeManager, const GridView &gridView) : ParentType(timeManager, gridView) - { - eps_ = 1e-6; - } + {} /*! * \name Problem parameters @@ -260,7 +258,7 @@ private: bool onUpperBoundary_(const GlobalPosition &globalPos) const { return globalPos[1] > this->bBoxMax()[1] - eps_; } - Scalar eps_; + static constexpr Scalar eps_ = 1e-6; }; } //end namespace diff --git a/test/freeflow/stokes2c/stokes2ctestproblem.hh b/test/freeflow/stokes2c/stokes2ctestproblem.hh index 81a61c6fcb62fca4cf715113b5c263383be38ec7..5c824d889172e3a88c6d261db63ebd5c95013ebc 100644 --- a/test/freeflow/stokes2c/stokes2ctestproblem.hh +++ b/test/freeflow/stokes2c/stokes2ctestproblem.hh @@ -110,8 +110,6 @@ public: Stokes2cTestProblem(TimeManager &timeManager, const GridView &gridView) : ParentType(timeManager, gridView) { - eps_ = 1e-6; - // initialize the tables of the fluid system FluidSystem::init(); } @@ -248,7 +246,7 @@ private: bool onUpperBoundary_(const GlobalPosition &globalPos) const { return globalPos[1] > this->bBoxMax()[1] - eps_; } - Scalar eps_; + static constexpr Scalar eps_ = 1e-6; }; } //end namespace diff --git a/test/freeflow/stokes2cni/stokes2cnitestproblem.hh b/test/freeflow/stokes2cni/stokes2cnitestproblem.hh index 1e6fe9953485f271edf2a09929107ff0ea41ce98..ee811947d49d0d87491abf20f8e2b4b4fef81d25 100644 --- a/test/freeflow/stokes2cni/stokes2cnitestproblem.hh +++ b/test/freeflow/stokes2cni/stokes2cnitestproblem.hh @@ -130,8 +130,6 @@ public: Stokes2cniTestProblem(TimeManager &timeManager, const GridView &gridView) : ParentType(timeManager, gridView) { - eps_ = 1e-6; - // initialize the tables of the fluid system FluidSystem::init(); @@ -236,8 +234,8 @@ private: values[pressureIdx] = 1e5 + 1.189*this->gravity()[1]*globalPos[1]; values[massOrMoleFracIdx] = 1e-4; values[temperatureIdx] = 283.15; - if(globalPos[0] < 0.75 && globalPos[0] > 0.25 && - globalPos[1] < 0.75 && globalPos[1] > 0.25) + if(globalPos[0] < 0.75 + eps_ && globalPos[0] > 0.25 - eps_ && + globalPos[1] < 0.75 + eps_ && globalPos[1] > 0.25 - eps_) { values[massOrMoleFracIdx] = 0.9e-4; values[temperatureIdx] = 284.15; @@ -274,7 +272,7 @@ private: || onLowerBoundary_(globalPos) || onUpperBoundary_(globalPos)); } - Scalar eps_; + static constexpr Scalar eps_ = 1e-6; Scalar velocity_; }; } //end namespace diff --git a/test/freeflow/zeroeq/zeroeqchanneltestproblem.hh b/test/freeflow/zeroeq/zeroeqchanneltestproblem.hh index d6c568b4f3d0644257a1699afe7961989b7a6630..f98c73d3dc7abd8429d7279dc5ad5f156b4dd067 100644 --- a/test/freeflow/zeroeq/zeroeqchanneltestproblem.hh +++ b/test/freeflow/zeroeq/zeroeqchanneltestproblem.hh @@ -114,8 +114,6 @@ public: ZeroEqChannelTestProblem(TimeManager &timeManager, const GridView &gridView) : ParentType(timeManager, gridView) { - eps_ = 1e-6; - injectionVelocity_ = GET_RUNTIME_PARAM(TypeTag, Scalar, Problem.InjectionVelocity); } @@ -254,7 +252,7 @@ private: bool onUpperBoundary_(const GlobalPosition &globalPos) const { return globalPos[1] > this->bBoxMax()[1] - eps_; } - Scalar eps_; + static constexpr Scalar eps_ = 1e-6; Scalar injectionVelocity_; }; diff --git a/test/freeflow/zeroeq/zeroeqtestproblem.hh b/test/freeflow/zeroeq/zeroeqtestproblem.hh index 137ee962d7498bc72fc0b140d9662ccb2a84dba8..78b2af8c91734a21456503fa23cde5a5dc20e4dd 100644 --- a/test/freeflow/zeroeq/zeroeqtestproblem.hh +++ b/test/freeflow/zeroeq/zeroeqtestproblem.hh @@ -116,8 +116,6 @@ public: ZeroEqTestProblem(TimeManager &timeManager, const GridView &gridView) : ParentType(timeManager, gridView) { - eps_ = 1e-6; - injectionVelocity_ = GET_RUNTIME_PARAM(TypeTag, Scalar, Problem.InjectionVelocity); } @@ -240,7 +238,7 @@ private: bool onUpperBoundary_(const GlobalPosition &globalPos) const { return globalPos[1] > this->bBoxMax()[1] - eps_; } - Scalar eps_; + static constexpr Scalar eps_ = 1e-6; Scalar injectionVelocity_; }; diff --git a/test/freeflow/zeroeq2c/zeroeq2ctestproblem.hh b/test/freeflow/zeroeq2c/zeroeq2ctestproblem.hh index b0b0b38b571a15a039c78b70883123f1745d257e..fd891357454f6c46c0de2bc121950f3c41088802 100644 --- a/test/freeflow/zeroeq2c/zeroeq2ctestproblem.hh +++ b/test/freeflow/zeroeq2c/zeroeq2ctestproblem.hh @@ -222,7 +222,7 @@ private: values[velocityXIdx] = injectionVelocity_; Scalar middle = 0.5 * (this->bBoxMax()[1] - this->bBoxMin()[1]); - if (onLeftBoundary_(globalPos) && globalPos[1] > middle - 0.2 && globalPos[1] < middle + 0.2) + if (onLeftBoundary_(globalPos) && globalPos[1] > middle - 0.2 - eps_ && globalPos[1] < middle + 0.2 + eps_) values[massOrMoleFracIdx] = injectionConcentration_; values[pressureIdx] = 1e5; diff --git a/test/freeflow/zeroeq2cni/zeroeq2cnitestproblem.hh b/test/freeflow/zeroeq2cni/zeroeq2cnitestproblem.hh index a3b1f19fc2ae6c1be9fbf4a45c24040af32f8fcf..e1f5ce4dcd080811ba8b6fe9dda36dadb2a593bb 100644 --- a/test/freeflow/zeroeq2cni/zeroeq2cnitestproblem.hh +++ b/test/freeflow/zeroeq2cni/zeroeq2cnitestproblem.hh @@ -115,8 +115,6 @@ public: , flowNormal_(GET_PARAM_FROM_GROUP(TypeTag, int, ZeroEq, FlowNormal)) , wallNormal_(GET_PARAM_FROM_GROUP(TypeTag, int, ZeroEq, WallNormal)) { - eps_ = 1e-6; - injectionVelocity_ = GET_RUNTIME_PARAM(TypeTag, Scalar, Problem.InjectionVelocity); injectionConcentration_ = GET_RUNTIME_PARAM(TypeTag, Scalar, Problem.InjectionConcentration); wallTemperature_ = GET_RUNTIME_PARAM(TypeTag, Scalar, Problem.WallTemperature); @@ -244,7 +242,7 @@ private: const unsigned int flowNormal_; const unsigned int wallNormal_; - Scalar eps_; + static constexpr Scalar eps_ = 1e-6; Scalar injectionVelocity_; Scalar injectionConcentration_; Scalar wallTemperature_; diff --git a/test/geomechanics/el1p2c/el1p2cproblem.hh b/test/geomechanics/el1p2c/el1p2cproblem.hh index 741662f4f574638d301def3040d13e2351686e1e..592bda3fa9fa217850b1046645c8b9104a8b5da1 100644 --- a/test/geomechanics/el1p2c/el1p2cproblem.hh +++ b/test/geomechanics/el1p2c/el1p2cproblem.hh @@ -204,9 +204,9 @@ class El1P2CProblem: public ImplicitPorousMediaProblem<TypeTag> { values = Scalar(0.0); - if(globalPos[0] < 6 && globalPos[0] > 4 - && globalPos[1] < 6 && globalPos[1] > 4 - && globalPos[2] < 6 && globalPos[2] > 4) + if(globalPos[0] < 6 + eps_ && globalPos[0] > 4 - eps_ + && globalPos[1] < 6 + eps_ && globalPos[1] > 4 - eps_ + && globalPos[2] < 6 + eps_ && globalPos[2] > 4 - eps_) { values[0] = 1.e-3; values[1] = 1.e-4; diff --git a/test/geomechanics/el2p/el2pproblem.hh b/test/geomechanics/el2p/el2pproblem.hh index 65cf9bb72b8e4547c41c53aa40e19d3621587c80..d0627913fae854b7bb888a2fb7a84bfb752dcfee 100644 --- a/test/geomechanics/el2p/el2pproblem.hh +++ b/test/geomechanics/el2p/el2pproblem.hh @@ -591,9 +591,9 @@ public: { values = 0.0; if(initializationRun_ == false){ - if(globalPos[0] > 490 && globalPos[0] < 510 - && globalPos[1] > 490 && globalPos[1] < 510 - && globalPos[dimWorld-1] > 490 && globalPos[dimWorld-1] < 510) + if(globalPos[0] > 490-eps_ && globalPos[0] < 510+eps_ + && globalPos[1] > 490-eps_ && globalPos[1] < 510+eps_ + && globalPos[dimWorld-1] > 490-eps_ && globalPos[dimWorld-1] < 510+eps_) values[saturationIdx] = 1.e-5; // injection } } diff --git a/test/multidomain/2cnistokes2p2cni/stokes2cnisubproblem.hh b/test/multidomain/2cnistokes2p2cni/stokes2cnisubproblem.hh index 2af195129031641182cfdf2c0b070febdd88da4e..0413c125ced24cd581a923fcf04531e9ba30f128 100644 --- a/test/multidomain/2cnistokes2p2cni/stokes2cnisubproblem.hh +++ b/test/multidomain/2cnistokes2p2cni/stokes2cnisubproblem.hh @@ -342,7 +342,7 @@ public: const Scalar xVelocity = xVelocity_(globalPos); if (onLeftBoundary_(globalPos) - && globalPos[1] > bBoxMin_[1] && globalPos[1] < bBoxMax_[1]) + && globalPos[1] > bBoxMin_[1] - eps_ && globalPos[1] < bBoxMax_[1] + eps_) { values[transportEqIdx] = -xVelocity*density*refMassfrac(); values[energyEqIdx] = -xVelocity*density*enthalpy; diff --git a/test/multidomain/2cstokes2p2c/2cstokes2p2cproblem.hh b/test/multidomain/2cstokes2p2c/2cstokes2p2cproblem.hh index 98949507864f35fbea0d7c5aaa5b337ad71ac829..d975bec88982b5e5055ea6dd11f517818b4f638c 100644 --- a/test/multidomain/2cstokes2p2c/2cstokes2p2cproblem.hh +++ b/test/multidomain/2cstokes2p2c/2cstokes2p2cproblem.hh @@ -177,10 +177,10 @@ public: { GlobalPosition globalPos = element.geometry().center(); - if (globalPos[1] > interfacePosY_) + if (globalPos[1] > interfacePosY_ - eps_) mdGrid.addToSubDomain(stokes2c_,element); else - if(globalPos[0] > noDarcyX_) + if(globalPos[0] > noDarcyX_ - eps_) mdGrid.addToSubDomain(twoPtwoC_,element); } mdGrid.preUpdateSubDomains(); @@ -251,6 +251,8 @@ private: Scalar noDarcyX_; Scalar episodeLength_; Scalar initializationTime_; + + static constexpr Scalar eps_ = 1e-8; }; } // namespace Dumux diff --git a/test/multidomain/2cstokes2p2c/stokes2csubproblem.hh b/test/multidomain/2cstokes2p2c/stokes2csubproblem.hh index 1916ad4cc2b31c014363726715e7672e2a6997b8..e6e61f16bad63d1601942a01b48cfd5d6b0f4c0a 100644 --- a/test/multidomain/2cstokes2p2c/stokes2csubproblem.hh +++ b/test/multidomain/2cstokes2p2c/stokes2csubproblem.hh @@ -313,7 +313,7 @@ public: const Scalar xVelocity = xVelocity_(globalPos); if (onLeftBoundary_(globalPos) - && globalPos[1] > bBoxMin_[1] && globalPos[1] < bBoxMax_[1]) + && globalPos[1] > bBoxMin_[1] - eps_ && globalPos[1] < bBoxMax_[1] + eps_) { // rho*v*X at inflow values[transportEqIdx] = -xVelocity * density * refMassfrac(); diff --git a/test/multidomain/2czeroeq2p2c/2czeroeq2p2cproblem.hh b/test/multidomain/2czeroeq2p2c/2czeroeq2p2cproblem.hh index 2f1596456bbd4a1d4c9fae00ffc70174a5911984..1479aa64c5b7cc2398b843936e70da30ca20be38 100644 --- a/test/multidomain/2czeroeq2p2c/2czeroeq2p2cproblem.hh +++ b/test/multidomain/2czeroeq2p2c/2czeroeq2p2cproblem.hh @@ -161,10 +161,10 @@ public: { GlobalPosition globalPos = element.geometry().center(); - if (globalPos[1] > interfacePosY_) + if (globalPos[1] > interfacePosY_ - eps_) mdGrid.addToSubDomain(zeroeq2c_,element); else - if(globalPos[0] > noDarcyX_) + if(globalPos[0] > noDarcyX_ - eps_) mdGrid.addToSubDomain(twoPtwoC_,element); } mdGrid.preUpdateSubDomains(); @@ -213,6 +213,8 @@ private: Scalar episodeLength_; Scalar initializationTime_; Scalar dtInit_; + + static constexpr Scalar eps_ = 1e-8; }; } // namespace Dumux diff --git a/test/multidomain/2czeroeq2p2c/zeroeq2csubproblem.hh b/test/multidomain/2czeroeq2p2c/zeroeq2csubproblem.hh index 6d8851e1d96bc1d15e7aaed48155703cedbfa3ef..806c1c55ebea308e2eb293f30843414f349caf21 100644 --- a/test/multidomain/2czeroeq2p2c/zeroeq2csubproblem.hh +++ b/test/multidomain/2czeroeq2p2c/zeroeq2csubproblem.hh @@ -268,7 +268,7 @@ public: // rho*v*X at inflow if (onLeftBoundary_(globalPos) - && globalPos[1] > bBoxMin_[1] && globalPos[1] < bBoxMax_[1]) + && globalPos[1] > bBoxMin_[1] - eps_ && globalPos[1] < bBoxMax_[1] + eps_) { values[transportEqIdx] = -xVelocity_(globalPos) * density * refMassfrac(); } diff --git a/test/porousmediumflow/1p/implicit/1pniconductionproblem.hh b/test/porousmediumflow/1p/implicit/1pniconductionproblem.hh index ae4a37cfe8008b82077f8b54dc2df555c9fe946a..3b49fd61ceefc9b7dbd50ea00b836dbf5a8d4e67 100644 --- a/test/porousmediumflow/1p/implicit/1pniconductionproblem.hh +++ b/test/porousmediumflow/1p/implicit/1pniconductionproblem.hh @@ -132,7 +132,6 @@ class OnePNIConductionProblem : public ImplicitPorousMediaProblem<TypeTag> public: OnePNIConductionProblem(TimeManager &timeManager, const GridView &gridView) : ParentType(timeManager, gridView) - , eps_(1e-6) { //initialize fluid system FluidSystem::init(); @@ -343,7 +342,7 @@ private: } Scalar temperatureHigh_; - const Scalar eps_; + static constexpr Scalar eps_ = 1e-6; std::string name_; int outputInterval_; }; diff --git a/test/porousmediumflow/1p2c/implicit/1p2cniconductionproblem.hh b/test/porousmediumflow/1p2c/implicit/1p2cniconductionproblem.hh index 0ed78b339c641277293ca523a09eb7837206aeb8..e3fe3c0b4208f57080e2d3b594caf0958c419b85 100644 --- a/test/porousmediumflow/1p2c/implicit/1p2cniconductionproblem.hh +++ b/test/porousmediumflow/1p2c/implicit/1p2cniconductionproblem.hh @@ -146,7 +146,6 @@ class OnePTwoCNIConductionProblem : public ImplicitPorousMediaProblem<TypeTag> public: OnePTwoCNIConductionProblem(TimeManager &timeManager, const GridView &gridView) : ParentType(timeManager, gridView) - , eps_(1e-6) { //initialize fluid system FluidSystem::init(); @@ -363,7 +362,7 @@ private: } Scalar temperatureHigh_; - const Scalar eps_; + static constexpr Scalar eps_ = 1e-6; std::string name_; int outputInterval_; }; diff --git a/test/porousmediumflow/1p2c/implicit/1p2cniconvectionproblem.hh b/test/porousmediumflow/1p2c/implicit/1p2cniconvectionproblem.hh index 83b0dad6ea43414781af5f858885101c7953dd6a..18165710708da951056e991015206581fa034f8d 100644 --- a/test/porousmediumflow/1p2c/implicit/1p2cniconvectionproblem.hh +++ b/test/porousmediumflow/1p2c/implicit/1p2cniconvectionproblem.hh @@ -145,7 +145,6 @@ class OnePTwoCNIConvectionProblem : public ImplicitPorousMediaProblem<TypeTag> public: OnePTwoCNIConvectionProblem(TimeManager &timeManager, const GridView &gridView) : ParentType(timeManager, gridView) - , eps_(1e-6) { //initialize fluid system FluidSystem::init(); @@ -387,7 +386,7 @@ private: Scalar pressureHigh_; Scalar pressureLow_; Scalar darcyVelocity_; - const Scalar eps_; + static constexpr Scalar eps_ = 1e-6; std::string name_; int outputInterval_; }; diff --git a/test/porousmediumflow/1p2c/implicit/1p2coutflowproblem.hh b/test/porousmediumflow/1p2c/implicit/1p2coutflowproblem.hh index 126f5e82227c6547b7161355e4d0548ad9018baa..06b547aa180e0bfd0a0e6f43de6f5569f0443cc7 100644 --- a/test/porousmediumflow/1p2c/implicit/1p2coutflowproblem.hh +++ b/test/porousmediumflow/1p2c/implicit/1p2coutflowproblem.hh @@ -157,7 +157,6 @@ class OnePTwoCOutflowProblem : public ImplicitPorousMediaProblem<TypeTag> public: OnePTwoCOutflowProblem(TimeManager &timeManager, const GridView &gridView) : ParentType(timeManager, gridView) - , eps_(1e-6) { //initialize fluid system FluidSystem::init(); @@ -338,7 +337,7 @@ private: #endif } - const Scalar eps_; + static constexpr Scalar eps_ = 1e-6; std::string name_; }; diff --git a/test/porousmediumflow/2p/implicit/cc2pcornerpointproblem.hh b/test/porousmediumflow/2p/implicit/cc2pcornerpointproblem.hh index 181628d61813a0f8c5da35e27715f084e5433fe7..a0fcee16206369c90a3f3f055b7d227abce67bad 100644 --- a/test/porousmediumflow/2p/implicit/cc2pcornerpointproblem.hh +++ b/test/porousmediumflow/2p/implicit/cc2pcornerpointproblem.hh @@ -132,7 +132,6 @@ public: : ParentType(timeManager, gridView), gravity_(0) { gravity_[dimWorld-1] = 9.81; - eps_ = 3e-6; temperature_ = 273.15 + 20; // -> 20°C name_ = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, std::string, Problem, Name); @@ -232,7 +231,7 @@ public: // set no-flux on top and bottom, hydrostatic on the rest // use the intersection normal to decide const GlobalPosition normal = intersection.centerUnitOuterNormal(); - if (std::abs(normal[dimWorld-1]) > 0.5) + if (std::abs(normal[dimWorld-1]) > 0.5 - eps_) values.setAllNeumann(); else values.setAllDirichlet(); @@ -330,7 +329,7 @@ public: private: Scalar temperature_; - Scalar eps_; + static constexpr Scalar eps_ = 3e-6; std::string name_; GlobalPosition gravity_; int injectionElement_; diff --git a/test/porousmediumflow/2p/implicit/fractureproblem.hh b/test/porousmediumflow/2p/implicit/fractureproblem.hh index a3ca342c93d9129638f30c435ffd904861135683..63bdbf0eeb711055b68b160fe98c318177e10f1d 100644 --- a/test/porousmediumflow/2p/implicit/fractureproblem.hh +++ b/test/porousmediumflow/2p/implicit/fractureproblem.hh @@ -167,7 +167,6 @@ public: FractureProblem(TimeManager &timeManager, const GridView &gridView) : ParentType(timeManager, gridView) { - eps_ = 1.5e-7; name_ = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, std::string, Problem, Name); } @@ -246,7 +245,7 @@ public: if (onInlet_(globalPos)) values.setAllNeumann(); - if (globalPos[2] > 1.0-eps_ || globalPos[2] < eps_) + if (globalPos[2] > 1.0 - eps_ || globalPos[2] < eps_) values.setAllNeumann(); } @@ -312,10 +311,10 @@ public: private: bool onInlet_(const GlobalPosition &globalPos) const { - return globalPos[0] < eps_ && globalPos[1] > -0.5; + return globalPos[0] < eps_ && globalPos[1] > -0.5 - eps_; } - Scalar eps_; + static constexpr Scalar eps_ = 1.5e-7; std::string name_; }; diff --git a/test/porousmediumflow/2p/implicit/generalizeddirichletproblem.hh b/test/porousmediumflow/2p/implicit/generalizeddirichletproblem.hh index 1125ced35e1daada47ed903de2031eaa5e312e6e..a43fbdf1138e06513d6cbe4b48c8ca349395ed05 100644 --- a/test/porousmediumflow/2p/implicit/generalizeddirichletproblem.hh +++ b/test/porousmediumflow/2p/implicit/generalizeddirichletproblem.hh @@ -113,7 +113,6 @@ public: GeneralizedDirichletProblem(TimeManager &timeManager, const GridView &gridView) : ParentType(timeManager, gridView) - , eps_(3e-6) { name_ = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, std::string, Problem, Name); } @@ -193,7 +192,7 @@ public: } private: - Scalar eps_; + static constexpr Scalar eps_ = 3e-6; std::string name_; }; } diff --git a/test/porousmediumflow/2p/implicit/injectionproblem2pni.hh b/test/porousmediumflow/2p/implicit/injectionproblem2pni.hh index 91521b5250fbabb10c21d7564cb2278240f6274c..eb5425cd02585522e78c3bb86029d873ab38af9d 100644 --- a/test/porousmediumflow/2p/implicit/injectionproblem2pni.hh +++ b/test/porousmediumflow/2p/implicit/injectionproblem2pni.hh @@ -164,7 +164,6 @@ public: : ParentType(timeManager, gridView) { maxDepth_ = 2700.0; // [m] - eps_ = 1e-6; // initialize the tables of the fluid system FluidSystem::init(/*tempMin=*/273.15, @@ -291,7 +290,7 @@ public: else globalPos = intersection.geometry().center(); - if (globalPos[1] < 15 && globalPos[1] > 7) { + if (globalPos[1] < 15 + eps_ && globalPos[1] > 7 - eps_) { // inject air. negative values mean injection values[contiNEqIdx] = -1e-3; // kg/(s*m^2) } @@ -320,7 +319,7 @@ public: #if !ISOTHERMAL values[temperatureIdx] = 283.0 + (maxDepth_ - globalPos[1])*0.03; - if (globalPos[0] > 20 && globalPos[0] < 30 && globalPos[1] > 5 && globalPos[1] < 35) + if (globalPos[0] > 20 - eps_ && globalPos[0] < 30 + eps_ && globalPos[1] > 5 - eps_ && globalPos[1] < 35 + eps_) values[temperatureIdx] = 380; #endif // !ISOTHERMAL } @@ -328,7 +327,7 @@ public: private: Scalar maxDepth_; - Scalar eps_; + static constexpr Scalar eps_ = 1.5e-7; std::string name_; }; } //end namespace diff --git a/test/porousmediumflow/2p/implicit/lensproblem.hh b/test/porousmediumflow/2p/implicit/lensproblem.hh index 07fde62f11a827d0b6a7080203e35c6eaa1435c6..8f3d9e2c46e533a2639c6d0b28ae7fef8ef98297 100644 --- a/test/porousmediumflow/2p/implicit/lensproblem.hh +++ b/test/porousmediumflow/2p/implicit/lensproblem.hh @@ -211,7 +211,6 @@ public: const GridView &gridView) : ParentType(timeManager, gridView) { - eps_ = 3e-6; temperature_ = 273.15 + 20; // -> 20°C name_ = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, @@ -455,7 +454,7 @@ private: } Scalar temperature_; - Scalar eps_; + static constexpr Scalar eps_ = 3e-6; std::string name_; }; } //end namespace diff --git a/test/porousmediumflow/2p/implicit/lensspatialparams.hh b/test/porousmediumflow/2p/implicit/lensspatialparams.hh index 8d4b53a53e2081fd5de6fe5f169b6eb9c56b5da1..9328c180b848cd9cafd53827e256c5c6fc76390d 100644 --- a/test/porousmediumflow/2p/implicit/lensspatialparams.hh +++ b/test/porousmediumflow/2p/implicit/lensspatialparams.hh @@ -173,7 +173,7 @@ private: bool isInLens_(const GlobalPosition &globalPos) const { for (int i = 0; i < dimWorld; ++i) { - if (globalPos[i] < lensLowerLeft_[i] || globalPos[i] > lensUpperRight_[i]) + if (globalPos[i] < lensLowerLeft_[i] + eps_ || globalPos[i] > lensUpperRight_[i] - eps_) return false; } return true; @@ -186,6 +186,8 @@ private: Scalar outerK_; MaterialLawParams lensMaterialParams_; MaterialLawParams outerMaterialParams_; + + static constexpr Scalar eps_ = 1.5e-7; }; } // end namespace diff --git a/test/porousmediumflow/2p/sequential/test_impesadaptiveproblem.hh b/test/porousmediumflow/2p/sequential/test_impesadaptiveproblem.hh index f24324f108b8696504a70e0d126061a571cc5199..3a45ef74c5fb43f675b966e3e15f303fc982be0b 100644 --- a/test/porousmediumflow/2p/sequential/test_impesadaptiveproblem.hh +++ b/test/porousmediumflow/2p/sequential/test_impesadaptiveproblem.hh @@ -144,7 +144,7 @@ class TestIMPESAdaptiveProblem: public IMPESProblem2P<TypeTag> public: TestIMPESAdaptiveProblem(TimeManager &timeManager, const GridView &gridView) : - ParentType(timeManager, gridView), eps_(1e-6) + ParentType(timeManager, gridView) { name_ = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, std::string, Problem, Name); @@ -271,7 +271,7 @@ public: } private: - const Scalar eps_; + static constexpr Scalar eps_ = 1e-6; std::string name_; }; } //end namespace diff --git a/test/porousmediumflow/2p/sequential/test_impesproblem.hh b/test/porousmediumflow/2p/sequential/test_impesproblem.hh index 074f2fd601786d4293af21c80cd0598b79a19fc0..5fba7a84e4e815e1f88c34c851fdcaa16853e965 100644 --- a/test/porousmediumflow/2p/sequential/test_impesproblem.hh +++ b/test/porousmediumflow/2p/sequential/test_impesproblem.hh @@ -163,7 +163,7 @@ typedef typename GET_PROP(TypeTag, SolutionTypes) SolutionTypes; public: IMPESTestProblem(TimeManager &timeManager, const GridView &gridView) : -ParentType(timeManager, gridView), eps_(1e-6) +ParentType(timeManager, gridView) { name_ = GET_RUNTIME_PARAM(TypeTag, std::string, Problem.Name); } @@ -283,7 +283,7 @@ void initial(PrimaryVariables &values, private: -const Scalar eps_; +static constexpr Scalar eps_ = 1e-6; std::string name_; }; } //end namespace diff --git a/test/porousmediumflow/2p/sequential/test_mpfa2pspatialparams.hh b/test/porousmediumflow/2p/sequential/test_mpfa2pspatialparams.hh index bb06311da25168b2a312d943ac737259b77330b5..b2a890214c868751d882fde0b0325ff97dccd9fc 100644 --- a/test/porousmediumflow/2p/sequential/test_mpfa2pspatialparams.hh +++ b/test/porousmediumflow/2p/sequential/test_mpfa2pspatialparams.hh @@ -279,7 +279,7 @@ private: { for (int i = 0; i < dim; i++) { - if (globalPos[i] < lensOneLowerLeft_[i] || globalPos[i] > lensOneUpperRight_[i]) + if (globalPos[i] < lensOneLowerLeft_[i] + eps_ || globalPos[i] > lensOneUpperRight_[i] - eps_) { return false; } @@ -290,7 +290,7 @@ private: { for (int i = 0; i < dim; i++) { - if (globalPos[i] < lensTwoLowerLeft_[i] || globalPos[i] > lensTwoUpperRight_[i]) + if (globalPos[i] < lensTwoLowerLeft_[i] + eps_ || globalPos[i] > lensTwoUpperRight_[i] - eps_) { return false; } @@ -301,7 +301,7 @@ private: { for (int i = 0; i < dim; i++) { - if (globalPos[i] < lensThreeLowerLeft_[i] || globalPos[i] > lensThreeUpperRight_[i]) + if (globalPos[i] < lensThreeLowerLeft_[i] + eps_ || globalPos[i] > lensThreeUpperRight_[i] - eps_) { return false; } @@ -319,6 +319,8 @@ private: GlobalPosition lensTwoUpperRight_; GlobalPosition lensThreeLowerLeft_; GlobalPosition lensThreeUpperRight_; + + static constexpr Scalar eps_ = 1e-6; }; } // end namespace diff --git a/test/porousmediumflow/2p/sequential/test_transportproblem.hh b/test/porousmediumflow/2p/sequential/test_transportproblem.hh index 5cfc6e108c90060cfe93721e6fd2185063780429..b833a0d3c0a4ce7e0e3f66dcbe7d38f5cc64e204 100644 --- a/test/porousmediumflow/2p/sequential/test_transportproblem.hh +++ b/test/porousmediumflow/2p/sequential/test_transportproblem.hh @@ -122,7 +122,7 @@ class TestTransportProblem: public TransportProblem2P<TypeTag> public: TestTransportProblem(TimeManager &timeManager, const GridView &gridView) : - ParentType(timeManager, gridView), eps_(1e-6) + ParentType(timeManager, gridView) {} @@ -251,7 +251,7 @@ public: } private: - const Scalar eps_; + static constexpr Scalar eps_ = 1e-6; }; } //end namespace diff --git a/test/porousmediumflow/2p1c/implicit/steaminjectionproblem.hh b/test/porousmediumflow/2p1c/implicit/steaminjectionproblem.hh index 27f692e876663a57444883c988e370a7d5cc6a4d..97a3347bd0eba5a200f2ec79e9a2983240d388ad 100644 --- a/test/porousmediumflow/2p1c/implicit/steaminjectionproblem.hh +++ b/test/porousmediumflow/2p1c/implicit/steaminjectionproblem.hh @@ -133,7 +133,7 @@ public: */ InjectionProblem(TimeManager &timeManager, const GridView &gridView) - : ParentType(timeManager, gridView), eps_(1e-6) + : ParentType(timeManager, gridView) { name_ = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, @@ -273,7 +273,7 @@ private: values[switch1Idx] = 283.13; } - Scalar eps_; + static constexpr Scalar eps_ = 1e-6; std::string name_; }; } //end namespace diff --git a/test/porousmediumflow/2p2c/implicit/injectionproblem.hh b/test/porousmediumflow/2p2c/implicit/injectionproblem.hh index 86c6f454b8ebf6ba9c9d8039c962d9cd57a285f1..23e41f822c2bafc7af742462805dcbc78febba5e 100644 --- a/test/porousmediumflow/2p2c/implicit/injectionproblem.hh +++ b/test/porousmediumflow/2p2c/implicit/injectionproblem.hh @@ -160,9 +160,6 @@ public: * - Overwriting on command line not possible */ - - eps_ = 1e-6; - // initialize the tables of the fluid system FluidSystem::init(/*Tmin=*/temperatureLow_, /*Tmax=*/temperatureHigh_, @@ -383,7 +380,7 @@ private: Scalar temperature_; Scalar depthBOR_; - Scalar eps_; + static constexpr Scalar eps_ = 1e-6; int nTemperature_; int nPressure_; diff --git a/test/porousmediumflow/2p2c/implicit/waterairproblem.hh b/test/porousmediumflow/2p2c/implicit/waterairproblem.hh index cb9283d6d36afd10785f596d15a3f13f0f74690a..5fee95755f2436e78c6b01a7d4f74d1939598ecb 100644 --- a/test/porousmediumflow/2p2c/implicit/waterairproblem.hh +++ b/test/porousmediumflow/2p2c/implicit/waterairproblem.hh @@ -156,7 +156,6 @@ public: : ParentType(timeManager, gridView) { maxDepth_ = 1000.0; // [m] - eps_ = 1e-6; FluidSystem::init(); @@ -291,7 +290,7 @@ public: globalPos = intersection.geometry().center(); // negative values for injection - if (globalPos[0] > 15 && globalPos[0] < 25 && + if (globalPos[0] > 15 - eps_ && globalPos[0] < 25 + eps_ && globalPos[1] < eps_) { values[contiNEqIdx] = -1e-3/FluidSystem::molarMass(nCompIdx); //(kg/(m^2*s) or mole/(m^2*s) ) @@ -319,7 +318,7 @@ public: initial_(values, globalPos); #if !ISOTHERMAL - if (globalPos[0] > 20 && globalPos[0] < 30 && globalPos[1] < 30) + if (globalPos[0] > 20 - eps_ && globalPos[0] < 30 + eps_ && globalPos[1] < 30 + eps_) values[temperatureIdx] = 380; #endif } @@ -353,7 +352,7 @@ private: } Scalar maxDepth_; - Scalar eps_; + static constexpr Scalar eps_ = 1e-6; std::string name_; }; } //end namespace diff --git a/test/porousmediumflow/2p2c/sequential/test_adaptive2p2c2dproblem.hh b/test/porousmediumflow/2p2c/sequential/test_adaptive2p2c2dproblem.hh index e3293ca7de29e12463cb02ffa2583f8df1ba4e75..c66fca6f71be0c830d20cd0591cd2ce4cabab7ba 100644 --- a/test/porousmediumflow/2p2c/sequential/test_adaptive2p2c2dproblem.hh +++ b/test/porousmediumflow/2p2c/sequential/test_adaptive2p2c2dproblem.hh @@ -174,7 +174,7 @@ Scalar referencePressureAtPos(const GlobalPosition& globalPos) const */ void boundaryTypesAtPos(BoundaryTypes &bcTypes, const GlobalPosition& globalPos) const { - if (globalPos[0] > this->bBoxMax()[0]-1E-6 || globalPos[0] < 1e-6) + if (globalPos[0] > this->bBoxMax()[0] - eps_|| globalPos[0] < eps_) bcTypes.setAllDirichlet(); else // all other boundaries @@ -198,7 +198,7 @@ void dirichletAtPos(PrimaryVariables &bcValues, const GlobalPosition& globalPos) Scalar temp = temperatureAtPos(globalPos); // Dirichlet for pressure equation - bcValues[Indices::pressureEqIdx] = (globalPos[0] < 1e-6) ? (2.5e5 - FluidSystem::H2O::liquidDensity(temp, pRef) * this->gravity()[dim-1]) + bcValues[Indices::pressureEqIdx] = (globalPos[0] < eps_) ? (2.5e5 - FluidSystem::H2O::liquidDensity(temp, pRef) * this->gravity()[dim-1]) : (2e5 - FluidSystem::H2O::liquidDensity(temp, pRef) * this->gravity()[dim-1]); // Dirichlet values for transport equations @@ -228,7 +228,7 @@ void source(PrimaryVariables &values, const Element &element) father = father.father(); } GlobalPosition globalPos = father.geometry().center(); - if (fabs(globalPos[0] - 4.8) < 0.5 && fabs(globalPos[1] - 4.8) < 0.5) + if (fabs(globalPos[0] - 4.8) < 0.5 + eps_ && fabs(globalPos[1] - 4.8) < 0.5 + eps_) values[Indices::contiNEqIdx] = 0.0001; } @@ -251,6 +251,7 @@ Scalar initConcentrationAtPos(const GlobalPosition& globalPos) const private: //Grid grid_; VtkMultiWriter<GridView> debugWriter_; +static constexpr Scalar eps_ = 1e-6; }; } //end namespace diff --git a/test/porousmediumflow/2p2c/sequential/test_adaptive2p2c3dproblem.hh b/test/porousmediumflow/2p2c/sequential/test_adaptive2p2c3dproblem.hh index d29abda775ea441ddac5da0f293d0e8cf924f57e..b59679b444e5200999b730b1bb3e75eef5a6ff8b 100644 --- a/test/porousmediumflow/2p2c/sequential/test_adaptive2p2c3dproblem.hh +++ b/test/porousmediumflow/2p2c/sequential/test_adaptive2p2c3dproblem.hh @@ -186,7 +186,7 @@ Scalar referencePressureAtPos(const GlobalPosition& globalPos) const */ void boundaryTypesAtPos(BoundaryTypes &bcTypes, const GlobalPosition& globalPos) const { - if (globalPos[0] > 10-1E-6 || globalPos[0] < 1e-6) + if (globalPos[0] > 10 - eps_ || globalPos[0] < eps_) bcTypes.setAllDirichlet(); else // all other boundaries @@ -210,7 +210,7 @@ void dirichletAtPos(PrimaryVariables &bcValues, const GlobalPosition& globalPos) Scalar temp = temperatureAtPos(globalPos); // Dirichlet for pressure equation - bcValues[Indices::pressureEqIdx] = (globalPos[0] < 1e-6) ? (2.5e5 - FluidSystem::H2O::liquidDensity(temp, pRef) * this->gravity()[dim-1]) + bcValues[Indices::pressureEqIdx] = (globalPos[0] < eps_) ? (2.5e5 - FluidSystem::H2O::liquidDensity(temp, pRef) * this->gravity()[dim-1]) : (2e5 - FluidSystem::H2O::liquidDensity(temp, pRef) * this->gravity()[dim-1]); // Dirichlet values for transport equations @@ -232,7 +232,7 @@ void neumannAtPos(PrimaryVariables &neumannValues, const GlobalPosition& globalP void sourceAtPos(PrimaryVariables &sourceValues, const GlobalPosition& globalPos) const { this->setZero(sourceValues); - if (fabs(globalPos[0] - 4.8) < 0.5 && fabs(globalPos[1] - 4.8) < 0.5) + if (fabs(globalPos[0] - 4.8) < 0.5 + eps_ && fabs(globalPos[1] - 4.8) < 0.5 + eps_) sourceValues[Indices::contiNEqIdx] = injectionrate_; } @@ -255,6 +255,7 @@ Scalar initConcentrationAtPos(const GlobalPosition& globalPos) const private: VtkMultiWriter<GridView> debugWriter_; Scalar injectionrate_; +static constexpr Scalar eps_ = 1e-6; }; } //end namespace diff --git a/test/porousmediumflow/2p2c/sequential/test_dec2p2cproblem.hh b/test/porousmediumflow/2p2c/sequential/test_dec2p2cproblem.hh index 012d38f6b85f72742e26b8fcdc6439613ff1ef0c..f2d09ca79fd9b730cc8248e26f38837513c4ebca 100644 --- a/test/porousmediumflow/2p2c/sequential/test_dec2p2cproblem.hh +++ b/test/porousmediumflow/2p2c/sequential/test_dec2p2cproblem.hh @@ -114,7 +114,7 @@ typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; public: TestDecTwoPTwoCProblem(TimeManager &timeManager, const GridView &gridView) : -ParentType(timeManager, gridView), eps_(1e-6), depthBOR_(1000.0) +ParentType(timeManager, gridView), depthBOR_(1000.0) {} /*! @@ -168,7 +168,7 @@ Scalar referencePressureAtPos(const GlobalPosition& globalPos) const */ void boundaryTypesAtPos(BoundaryTypes &bcTypes, const GlobalPosition& globalPos) const { - if (globalPos[0] > this->bBoxMax()[0]-1E-6 || globalPos[0] < 1e-6) + if (globalPos[0] > this->bBoxMax()[0] - eps_ || globalPos[0] < eps_) bcTypes.setAllDirichlet(); else // all other boundaries @@ -202,7 +202,7 @@ void dirichletAtPos(PrimaryVariables &bcValues ,const GlobalPosition& globalPos) Scalar temp = temperatureAtPos(globalPos); // Dirichlet for pressure equation - bcValues[Indices::pressureEqIdx] = (globalPos[0] < 1e-6) ? (2.5e5 - FluidSystem::H2O::liquidDensity(temp, pRef) * this->gravity()[dim-1]) + bcValues[Indices::pressureEqIdx] = (globalPos[0] < eps_) ? (2.5e5 - FluidSystem::H2O::liquidDensity(temp, pRef) * this->gravity()[dim-1]) : (2e5 - FluidSystem::H2O::liquidDensity(temp, pRef) * this->gravity()[dim-1]); // Dirichlet values for transport equations @@ -239,7 +239,7 @@ void neumannAtPos(PrimaryVariables &neumannValues, const GlobalPosition& globalP void sourceAtPos(PrimaryVariables &sourceValues, const GlobalPosition& globalPos) const { this->setZero(sourceValues); - if (fabs(globalPos[0] - 4.8) < 0.5 && fabs(globalPos[1] - 4.8) < 0.5) + if (fabs(globalPos[0] - 4.8) < 0.5 + eps_ && fabs(globalPos[1] - 4.8) < 0.5 + eps_) sourceValues[Indices::contiNEqIdx] = 0.0001; } //! Flag for the type of initial conditions @@ -262,7 +262,7 @@ private: GlobalPosition lowerLeft_; GlobalPosition upperRight_; -const Scalar eps_; +static constexpr Scalar eps_ = 1e-6; const Scalar depthBOR_; }; } //end namespace diff --git a/test/porousmediumflow/2p2c/sequential/test_multiphysics2p2cproblem.hh b/test/porousmediumflow/2p2c/sequential/test_multiphysics2p2cproblem.hh index a68e9097e6afa95daafc30ec1ee248132f8c0e95..31b4affa42aa49de1ed362a041314bbe1bba44e7 100644 --- a/test/porousmediumflow/2p2c/sequential/test_multiphysics2p2cproblem.hh +++ b/test/porousmediumflow/2p2c/sequential/test_multiphysics2p2cproblem.hh @@ -124,7 +124,7 @@ typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; public: TestMultTwoPTwoCProblem(TimeManager &timeManager, const GridView &gridView, const GlobalPosition upperRight = 0) : -ParentType(timeManager, gridView), lowerLeft_(0), upperRight_(upperRight), eps_(1e-6), depthBOR_(1000.0) +ParentType(timeManager, gridView), lowerLeft_(0), upperRight_(upperRight), depthBOR_(1000.0) {} /*! @@ -169,7 +169,7 @@ Scalar referencePressureAtPos(const GlobalPosition& globalPos) const */ void boundaryTypesAtPos(BoundaryTypes &bcTypes, const GlobalPosition& globalPos) const { - if (globalPos[0] > 10-1E-6 || globalPos[0] < 1e-6) + if (globalPos[0] > 10 - eps_ || globalPos[0] < eps_) bcTypes.setAllDirichlet(); else // all other boundaries @@ -192,7 +192,7 @@ void dirichletAtPos(PrimaryVariables &bcValues ,const GlobalPosition& globalPos) Scalar temp = temperatureAtPos(globalPos); // Dirichlet for pressure equation - bcValues[Indices::pressureEqIdx] = (globalPos[0] < 1e-6) ? (2.5e5 - FluidSystem::H2O::liquidDensity(temp, pRef) * this->gravity()[dim-1]) + bcValues[Indices::pressureEqIdx] = (globalPos[0] < eps_) ? (2.5e5 - FluidSystem::H2O::liquidDensity(temp, pRef) * this->gravity()[dim-1]) : (2e5 - FluidSystem::H2O::liquidDensity(temp, pRef) * this->gravity()[dim-1]); // Dirichlet values for transport equations @@ -214,7 +214,7 @@ void neumannAtPos(PrimaryVariables &neumannValues, const GlobalPosition& globalP void sourceAtPos(PrimaryVariables &sourceValues, const GlobalPosition& globalPos) const { this->setZero(sourceValues); - if (fabs(globalPos[0] - 4.8) < 0.5 && fabs(globalPos[1] - 4.8) < 0.5) + if (fabs(globalPos[0] - 4.8) < 0.5 + eps_ && fabs(globalPos[1] - 4.8) < 0.5 + eps_) sourceValues[Indices::contiNEqIdx] = 0.0001; } /*! @@ -236,7 +236,7 @@ private: GlobalPosition lowerLeft_; GlobalPosition upperRight_; -const Scalar eps_; +static constexpr Scalar eps_ = 1e-6; const Scalar depthBOR_; }; } //end namespace diff --git a/test/porousmediumflow/2pdfm/implicit/2pdfmtestproblem.hh b/test/porousmediumflow/2pdfm/implicit/2pdfmtestproblem.hh index 8f4af3e86a09b323dba024b76e8cd46c7f506fe7..0dc4fbee5be9a5eda9816acc141303ca0b0e1d88 100644 --- a/test/porousmediumflow/2pdfm/implicit/2pdfmtestproblem.hh +++ b/test/porousmediumflow/2pdfm/implicit/2pdfmtestproblem.hh @@ -145,7 +145,6 @@ public: : ParentType(timeManager, gridView), useInterfaceCondition_(true) { - eps_ = 3e-6; temperature_ = 273.15 + 20; // -> 20°C } @@ -347,7 +346,7 @@ private: } Scalar temperature_; - Scalar eps_; + static constexpr Scalar eps_ = 3e-6; bool useInterfaceCondition_; }; diff --git a/test/porousmediumflow/2pminc/implicit/2pminctestproblem.hh b/test/porousmediumflow/2pminc/implicit/2pminctestproblem.hh index e56c665755abd21cc6ee9fe02bbd86925ffc3f27..5d11097dcd2f0d5984c6c4d97278e8ebceb77ecd 100644 --- a/test/porousmediumflow/2pminc/implicit/2pminctestproblem.hh +++ b/test/porousmediumflow/2pminc/implicit/2pminctestproblem.hh @@ -179,7 +179,6 @@ public: const GridView &gridView) : ParentType(timeManager, gridView) { - eps_ = 3e-6; temperature_ = 273.15 + 20; // -> 20°C name_ = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, std::string, Problem, Name); @@ -378,7 +377,7 @@ private: } Scalar temperature_; - Scalar eps_; + static constexpr Scalar eps_ = 3e-6; std::string name_; }; diff --git a/test/porousmediumflow/2pnc/implicit/fuelcellproblem.hh b/test/porousmediumflow/2pnc/implicit/fuelcellproblem.hh index 0ddbdf3c2f2dc5cce166d4e4cefe8fc11a174fab..9d4d1f2aa4fab74b48dfbde56b31ed5e3f1383f8 100644 --- a/test/porousmediumflow/2pnc/implicit/fuelcellproblem.hh +++ b/test/porousmediumflow/2pnc/implicit/fuelcellproblem.hh @@ -151,8 +151,6 @@ public: pO2Inlet_ = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, ElectroChemistry, pO2Inlet); - eps_ = 1e-6; - FluidSystem::init(/*Tmin=*/temperatureLow_, /*Tmax=*/temperatureHigh_, /*nT=*/nTemperature_, @@ -394,7 +392,7 @@ private: { return globalPos[1] < 0.1*(this->bBoxMax()[1] - this->bBoxMin()[1]) + eps_; } Scalar temperature_; - Scalar eps_; + static constexpr Scalar eps_ = 1e-6; int nTemperature_; int nPressure_; std::string name_ ; diff --git a/test/porousmediumflow/2pnc/implicit/fuelcellspatialparams.hh b/test/porousmediumflow/2pnc/implicit/fuelcellspatialparams.hh index 55eab512b61ee623a81cbb2d9349e4ac6768ae5a..a6c9776e7157b7f5dbcd85befd911bee4f358b46 100644 --- a/test/porousmediumflow/2pnc/implicit/fuelcellspatialparams.hh +++ b/test/porousmediumflow/2pnc/implicit/fuelcellspatialparams.hh @@ -122,8 +122,6 @@ public: //parameters for the vanGenuchten law materialParams_.setVgAlpha(6.66e-5); // alpha = 1/pcb materialParams_.setVgn(3.652); - - eps_ = 1e-6; } ~FuelCellSpatialParams() @@ -180,7 +178,7 @@ public: private: DimMatrix K_; Scalar porosity_; - Scalar eps_; + static constexpr Scalar eps_ = 1e-6; MaterialLawParams materialParams_; }; diff --git a/test/porousmediumflow/2pncmin/implicit/dissolutionproblem.hh b/test/porousmediumflow/2pncmin/implicit/dissolutionproblem.hh index c6c2046e3aa87eae0fa90635be4f7ea3072b1525..73f73ba8c60d4650eea61e1080da92c9318dd5fe 100644 --- a/test/porousmediumflow/2pncmin/implicit/dissolutionproblem.hh +++ b/test/porousmediumflow/2pncmin/implicit/dissolutionproblem.hh @@ -298,7 +298,7 @@ public: values[pressureIdx] = reservoirPressure_; values[switchIdx] = initLiqSaturation_; // Sl primary variable values[xlNaClIdx] = massTomoleFrac_(outerSalinity_); // mole fraction - if(globalPos[0] > 5.0 - eps_ && globalPos[0] < 20.0 - eps_) + if(globalPos[0] > 5.0 - eps_ && globalPos[0] < 19.0 + eps_) values[precipNaClIdx] = initPrecipitatedSalt2_; // [kg/m^3] else values[precipNaClIdx] = initPrecipitatedSalt1_; // [kg/m^3] diff --git a/test/porousmediumflow/3p/implicit/3pniconductionproblem.hh b/test/porousmediumflow/3p/implicit/3pniconductionproblem.hh index ae8ea1c7d5204340ae758549026da59141f83a29..2c36f27c7787384a5fbf010506b1c23e1c2f9be4 100644 --- a/test/porousmediumflow/3p/implicit/3pniconductionproblem.hh +++ b/test/porousmediumflow/3p/implicit/3pniconductionproblem.hh @@ -135,7 +135,6 @@ class ThreePNIConductionProblem : public ImplicitPorousMediaProblem<TypeTag> public: ThreePNIConductionProblem(TimeManager &timeManager, const GridView &gridView) : ParentType(timeManager, gridView) - , eps_(1e-6) { //initialize fluid system FluidSystem::init(); @@ -357,7 +356,7 @@ private: } Scalar temperatureHigh_; - const Scalar eps_; + static constexpr Scalar eps_ = 1e-6; std::string name_; int outputInterval_; }; diff --git a/test/porousmediumflow/3p/implicit/3pniconvectionproblem.hh b/test/porousmediumflow/3p/implicit/3pniconvectionproblem.hh index 980403cbd8612fd5edccf33bb7864316b8a8da95..37e98b3719d61ad78562ed9bb8afb932f893ecfa 100644 --- a/test/porousmediumflow/3p/implicit/3pniconvectionproblem.hh +++ b/test/porousmediumflow/3p/implicit/3pniconvectionproblem.hh @@ -135,7 +135,6 @@ class ThreePNIConvectionProblem : public ImplicitPorousMediaProblem<TypeTag> public: ThreePNIConvectionProblem(TimeManager &timeManager, const GridView &gridView) : ParentType(timeManager, gridView) - , eps_(1e-6) { //initialize fluid system FluidSystem::init(); @@ -381,7 +380,7 @@ private: Scalar pressureHigh_; Scalar pressureLow_; Scalar darcyVelocity_; - const Scalar eps_; + static constexpr Scalar eps_ = 1e-6; std::string name_; int outputInterval_; }; diff --git a/test/porousmediumflow/3p/implicit/infiltration3pproblem.hh b/test/porousmediumflow/3p/implicit/infiltration3pproblem.hh index 5555760247e0cb1088ca557e568bbfbeb78b997d..aa5aad931d550183d2e53dd47f8f4d457d93f7d8 100644 --- a/test/porousmediumflow/3p/implicit/infiltration3pproblem.hh +++ b/test/porousmediumflow/3p/implicit/infiltration3pproblem.hh @@ -137,7 +137,6 @@ public: */ InfiltrationThreePProblem(TimeManager &timeManager, const GridView &gridView) : ParentType(timeManager, gridView) - , eps_(1e-6) { temperature_ = 273.15 + 10.0; // -> 10 degrees Celsius FluidSystem::init(282.15, 284.15, 3, 8e4, 3e5, 200); @@ -224,7 +223,7 @@ public: Scalar x = globalPos[0]; Scalar sw, swr=0.12, sgr=0.03; - if(y >(-1.E-3*x+5) ) + if(y > (-1.E-3*x+5) - eps_) { Scalar pc = 9.81 * 1000.0 * (y - (-5E-4*x+5)); if (pc < 0.0) pc = 0.0; @@ -276,7 +275,7 @@ public: // negative values for injection if (this->timeManager().time()<2592000.) { - if ((globalPos[0] <= 175.+eps_) && (globalPos[0] >= 150.+eps_) && (globalPos[1] >= 10.-eps_)) + if ((globalPos[0] <= 175.+eps_) && (globalPos[0] >= 155.-eps_) && (globalPos[1] >= 10.-eps_)) { values[Indices::contiWEqIdx] = -0.0; values[Indices::contiNEqIdx] = -0.001, // /*Molfluss, umr. über M(Mesit.)=0,120 kg/mol --> 1.2e-4 kg/(sm) @@ -324,7 +323,7 @@ private: Scalar x = globalPos[0]; Scalar sw, swr=0.12, sgr=0.03; - if(y >(-1.E-3*x+5) ) + if(y > (-1.E-3*x+5) - eps_) { Scalar pc = 9.81 * 1000.0 * (y - (-5E-4*x+5)); if (pc < 0.0) pc = 0.0; @@ -372,7 +371,7 @@ private: } Scalar temperature_; - Scalar eps_; + static constexpr Scalar eps_ = 1e-6; std::string name_; }; } //end namespace diff --git a/test/porousmediumflow/3p/implicit/infiltration3pspatialparams.hh b/test/porousmediumflow/3p/implicit/infiltration3pspatialparams.hh index 4f5505221162019bd4d539905480ef82ca1ca169..8755c205dea7a2b765ed7039593238ce6437d352 100644 --- a/test/porousmediumflow/3p/implicit/infiltration3pspatialparams.hh +++ b/test/porousmediumflow/3p/implicit/infiltration3pspatialparams.hh @@ -194,8 +194,8 @@ public: private: bool isFineMaterial_(const GlobalPosition &globalPos) const { return - 70. <= globalPos[0] && globalPos[0] <= 85. && - 7.0 <= globalPos[1] && globalPos[1] <= 7.50; + 70. - eps_ <= globalPos[0] && globalPos[0] <= 85. + eps_ && + 7.0 - eps_ <= globalPos[1] && globalPos[1] <= 7.50 + eps_; } Scalar fineK_; @@ -206,6 +206,8 @@ private: MaterialLawParams materialParams_; bool plotFluidMatrixInteractions_; + + static constexpr Scalar eps_ = 1e-6; }; } diff --git a/test/porousmediumflow/3p3c/implicit/columnxylolproblem.hh b/test/porousmediumflow/3p3c/implicit/columnxylolproblem.hh index 34dc848fa4c503bce8b6a4e2209f5b42445d7c7c..2f7313849d03d8e883d44f3bc6e5eef22fff72f4 100644 --- a/test/porousmediumflow/3p3c/implicit/columnxylolproblem.hh +++ b/test/porousmediumflow/3p3c/implicit/columnxylolproblem.hh @@ -136,7 +136,7 @@ public: * \param gridView The grid view */ ColumnProblem(TimeManager &timeManager, const GridView &gridView) - : ParentType(timeManager, gridView), eps_(1e-6) + : ParentType(timeManager, gridView) { FluidSystem::init(); @@ -318,51 +318,51 @@ private: if (y > 1.2 - eps_) values[switch2Idx] = 0.112; - else if (y > 1.2 - 0.0148) + else if (y > 1.2 - 0.0148 - eps_) values[switch2Idx] = 0 + ((1.2 - y)/0.0148)*0.112; - else if (y > 1.2 - 0.0296) + else if (y > 1.2 - 0.0296 - eps_) values[switch2Idx] = 0.112 + (((1.2 - y) - 0.0148)/0.0148)*(0.120 - 0.112); - else if (y > 1.2 - 0.0444) + else if (y > 1.2 - 0.0444 - eps_) values[switch2Idx] = 0.120 + (((1.2 - y) - 0.0296)/0.0148)*(0.125 - 0.120); - else if (y > 1.2 - 0.0592) + else if (y > 1.2 - 0.0592 - eps_) values[switch2Idx] = 0.125 + (((1.2 - y) - 0.0444)/0.0148)*(0.137 - 0.125); - else if (y > 1.2 - 0.0740) + else if (y > 1.2 - 0.0740 - eps_) values[switch2Idx] = 0.137 + (((1.2 - y) - 0.0592)/0.0148)*(0.150 - 0.137); - else if (y > 1.2 - 0.0888) + else if (y > 1.2 - 0.0888 - eps_) values[switch2Idx] = 0.150 + (((1.2 - y) - 0.0740)/0.0148)*(0.165 - 0.150); - else if (y > 1.2 - 0.1036) + else if (y > 1.2 - 0.1036 - eps_) values[switch2Idx] = 0.165 + (((1.2 - y) - 0.0888)/0.0148)*(0.182 - 0.165); - else if (y > 1.2 - 0.1184) + else if (y > 1.2 - 0.1184 - eps_) values[switch2Idx] = 0.182 + (((1.2 - y) - 0.1036)/0.0148)*(0.202 - 0.182); - else if (y > 1.2 - 0.1332) + else if (y > 1.2 - 0.1332 - eps_) values[switch2Idx] = 0.202 + (((1.2 - y) - 0.1184)/0.0148)*(0.226 - 0.202); - else if (y > 1.2 - 0.1480) + else if (y > 1.2 - 0.1480 - eps_) values[switch2Idx] = 0.226 + (((1.2 - y) - 0.1332)/0.0148)*(0.257 - 0.226); - else if (y > 1.2 - 0.1628) + else if (y > 1.2 - 0.1628 - eps_) values[switch2Idx] = 0.257 + (((1.2 - y) - 0.1480)/0.0148)*(0.297 - 0.257); - else if (y > 1.2 - 0.1776) + else if (y > 1.2 - 0.1776 - eps_) values[switch2Idx] = 0.297 + (((1.2 - y) - 0.1628)/0.0148)*(0.352 - 0.297); - else if (y > 1.2 - 0.1924) + else if (y > 1.2 - 0.1924 - eps_) values[switch2Idx] = 0.352 + (((1.2 - y) - 0.1776)/0.0148)*(0.426 - 0.352); - else if (y > 1.2 - 0.2072) + else if (y > 1.2 - 0.2072 - eps_) values[switch2Idx] = 0.426 + (((1.2 - y) - 0.1924)/0.0148)*(0.522 - 0.426); - else if (y > 1.2 - 0.2220) + else if (y > 1.2 - 0.2220 - eps_) values[switch2Idx] = 0.522 + (((1.2 - y) - 0.2072)/0.0148)*(0.640 - 0.522); - else if (y > 1.2 - 0.2368) + else if (y > 1.2 - 0.2368 - eps_) values[switch2Idx] = 0.640 + (((1.2 - y) - 0.2220)/0.0148)*(0.767 - 0.640); - else if (y > 1.2 - 0.2516) + else if (y > 1.2 - 0.2516 - eps_) values[switch2Idx] = 0.767 + (((1.2 - y) - 0.2368)/0.0148)*(0.878 - 0.767); - else if (y > 1.2 - 0.2664) + else if (y > 1.2 - 0.2664 - eps_) values[switch2Idx] = 0.878 + (((1.2 - y) - 0.2516)/0.0148)*(0.953 - 0.878); - else if (y > 1.2 - 0.2812) + else if (y > 1.2 - 0.2812 - eps_) values[switch2Idx] = 0.953 + (((1.2 - y) - 0.2664)/0.0148)*(0.988 - 0.953); - else if (y > 1.2 - 0.3000) + else if (y > 1.2 - 0.3000 - eps_) values[switch2Idx] = 0.988; else values[switch2Idx] = 1.e-4; } - const Scalar eps_; + static constexpr Scalar eps_ = 1e-6; std::string name_; }; } //end namespace diff --git a/test/porousmediumflow/3p3c/implicit/columnxylolspatialparams.hh b/test/porousmediumflow/3p3c/implicit/columnxylolspatialparams.hh index cb83c878028a39ab31a0508cd816df69dc65fe6b..3aa624a6f830df7e5b350d42431a878235880824 100644 --- a/test/porousmediumflow/3p3c/implicit/columnxylolspatialparams.hh +++ b/test/porousmediumflow/3p3c/implicit/columnxylolspatialparams.hh @@ -272,7 +272,7 @@ public: private: bool isFineMaterial_(const GlobalPosition &globalPos) const { - if (0.90 <= globalPos[1]) + if (0.90 - eps_ <= globalPos[1]) return true; else return false; } @@ -290,6 +290,8 @@ private: MaterialLawParams coarseMaterialParams_; Scalar lambdaSolid_; + + static constexpr Scalar eps_ = 1e-6; }; } diff --git a/test/porousmediumflow/3p3c/implicit/infiltrationproblem.hh b/test/porousmediumflow/3p3c/implicit/infiltrationproblem.hh index 1ed8fede28f2e7d6dc09cd5108587be7fdf95bcb..feec2c4e298e1f6643289da902df2dd53eadc7de 100644 --- a/test/porousmediumflow/3p3c/implicit/infiltrationproblem.hh +++ b/test/porousmediumflow/3p3c/implicit/infiltrationproblem.hh @@ -150,7 +150,6 @@ public: */ InfiltrationProblem(TimeManager &timeManager, const GridView &gridView) : ParentType(timeManager, gridView) - , eps_(1e-6) { temperature_ = 273.15 + 10.0; // -> 10 degrees Celsius FluidSystem::init(/*tempMin=*/temperature_ - 1, @@ -240,7 +239,7 @@ public: Scalar x = globalPos[0]; Scalar sw, swr=0.12, sgr=0.03; - if(y >(-1.E-3*x+5) ) + if(y >(-1.E-3*x+5) - eps_) { Scalar pc = 9.81 * 1000.0 * (y - (-5E-4*x+5)); if (pc < 0.0) pc = 0.0; @@ -290,7 +289,7 @@ public: globalPos = intersection.geometry().center(); // negative values for injection - if ((globalPos[0] <= 75.+eps_) && (globalPos[0] >= 50.+eps_) && (globalPos[1] >= 10.-eps_)) + if ((globalPos[0] <= 75.+eps_) && (globalPos[0] >= 55.-eps_) && (globalPos[1] >= 10.-eps_)) { values[contiWEqIdx] = -0.0; values[contiNEqIdx] = -0.001, //mole flow, convertion to mass flow with molar mass M(Mesit.)=0,120 kg/mol --> 1.2e-4 kg/(sm) @@ -372,7 +371,7 @@ private: Scalar x = globalPos[0]; Scalar sw, swr=0.12, sgr=0.03; - if(y >(-1.E-3*x+5) ) + if(y >(-1.E-3*x+5) - eps_) { Scalar pc = 9.81 * 1000.0 * (y - (-5E-4*x+5)); if (pc < 0.0) pc = 0.0; @@ -420,7 +419,7 @@ private: } Scalar temperature_; - Scalar eps_; + static constexpr Scalar eps_ = 1e-6; std::string name_; }; } //end namespace diff --git a/test/porousmediumflow/3p3c/implicit/kuevetteproblem.hh b/test/porousmediumflow/3p3c/implicit/kuevetteproblem.hh index 6011dfe66e3d249458bff202af58ee83f2f3d29e..87800c0683a7f6b68641cf4ee75e92875dad9be4 100644 --- a/test/porousmediumflow/3p3c/implicit/kuevetteproblem.hh +++ b/test/porousmediumflow/3p3c/implicit/kuevetteproblem.hh @@ -150,7 +150,7 @@ public: * \param gridView The grid view */ KuevetteProblem(TimeManager &timeManager, const GridView &gridView) - : ParentType(timeManager, gridView), eps_(1e-6) + : ParentType(timeManager, gridView) { FluidSystem::init(); @@ -357,7 +357,7 @@ private: } } - const Scalar eps_; + static constexpr Scalar eps_ = 1e-6; std::string name_; Scalar episodeLength_; }; diff --git a/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdproblem.hh b/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdproblem.hh index 2953d9eed8bcc074b942ded26fe3a8ef03ad4580..db13834c0a28391dde9fb46ac4cd7c01097c400d 100644 --- a/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdproblem.hh +++ b/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdproblem.hh @@ -141,7 +141,7 @@ public: */ SagdProblem(TimeManager &timeManager, const GridView &gridView) - : ParentType(timeManager, gridView), eps_(1e-6), pOut_(4e6) + : ParentType(timeManager, gridView), pOut_(4e6) { maxDepth_ = 400.0; // [m] @@ -430,7 +430,7 @@ private: } Scalar maxDepth_; - Scalar eps_; + static constexpr Scalar eps_ = 1e-6; Scalar pIn_; Scalar pOut_; Scalar totalMassProducedOil_; diff --git a/test/porousmediumflow/co2/implicit/heterogeneousproblem.hh b/test/porousmediumflow/co2/implicit/heterogeneousproblem.hh index 155955e493700cec3bef0e14d4d9c7f68e481f4d..dd260e8cc7e08355632daa16a3706f5889b4e5d4 100644 --- a/test/porousmediumflow/co2/implicit/heterogeneousproblem.hh +++ b/test/porousmediumflow/co2/implicit/heterogeneousproblem.hh @@ -192,8 +192,6 @@ public: // set the spatial parameters by reading the DGF grid file this->spatialParams().setParams(); - eps_ = 1e-6; - // initialize the tables of the fluid system FluidSystem::init(/*Tmin=*/temperatureLow_, /*Tmax=*/temperatureHigh_, @@ -489,7 +487,6 @@ private: Scalar depthBOR_; Scalar injectionRate_; - Scalar eps_; int nTemperature_; int nPressure_; diff --git a/test/porousmediumflow/co2/implicit/heterogeneousproblemni.hh b/test/porousmediumflow/co2/implicit/heterogeneousproblemni.hh index 0dfefd9f0b339d51b89e5dde09302a3064fbb2da..dc7934dea2fc5a65ae9426302394ded8d6443bc5 100644 --- a/test/porousmediumflow/co2/implicit/heterogeneousproblemni.hh +++ b/test/porousmediumflow/co2/implicit/heterogeneousproblemni.hh @@ -196,8 +196,6 @@ public: // set the spatial parameters by reading the DGF grid file this->spatialParams().setParams(); - eps_ = 1e-6; - // initialize the tables of the fluid system FluidSystem::init(/*Tmin=*/temperatureLow_, /*Tmax=*/temperatureHigh_, @@ -508,7 +506,6 @@ private: Scalar injectionRate_; Scalar injectionPressure_; Scalar injectionTemperature_; - Scalar eps_; int nTemperature_; int nPressure_; diff --git a/test/porousmediumflow/mpnc/implicit/combustionproblem1c.hh b/test/porousmediumflow/mpnc/implicit/combustionproblem1c.hh index d133fbbbb45e3ad7949556df269c38c2b6af1771..c4c2f6d97067242333531227b54b6a81df5ab482 100644 --- a/test/porousmediumflow/mpnc/implicit/combustionproblem1c.hh +++ b/test/porousmediumflow/mpnc/implicit/combustionproblem1c.hh @@ -240,7 +240,6 @@ public: void init() { - eps_ = 1e-6; outputName_ = GET_RUNTIME_PARAM(TypeTag, std::string, Constants.outputName); nRestart_ = GET_RUNTIME_PARAM(TypeTag, int, Constants.nRestart); TInitial_ = GET_RUNTIME_PARAM(TypeTag, Scalar, InitialConditions.TInitial); @@ -727,7 +726,7 @@ private: { return globalPos[dimWorld-1] > this->bBoxMax()[dimWorld-1] - eps_;} private: - Scalar eps_; + static constexpr Scalar eps_ = 1e-6;; int nTemperature_; int nPressure_; std::string outputName_; diff --git a/test/porousmediumflow/mpnc/implicit/combustionspatialparams.hh b/test/porousmediumflow/mpnc/implicit/combustionspatialparams.hh index abd2b36c477ecca41dc760b4f718e92e584bfd0a..2d329e34042c45a375ee5187db2b654c8219a17d 100644 --- a/test/porousmediumflow/mpnc/implicit/combustionspatialparams.hh +++ b/test/porousmediumflow/mpnc/implicit/combustionspatialparams.hh @@ -120,7 +120,6 @@ public: //! load parameters from input file and initialize parameter values void setInputInitialize() { - eps_ = 1e-6; // BEWARE! First the input values have to be set, then the material parameters can be set // this is the parameter value from file part @@ -335,8 +334,7 @@ public: } private: - Scalar eps_ ; - + static constexpr Scalar eps_ = 1e-6;; // Porous Medium Domain Scalar intrinsicPermeability_ ; diff --git a/test/porousmediumflow/mpnc/implicit/evaporationatmosphereproblem.hh b/test/porousmediumflow/mpnc/implicit/evaporationatmosphereproblem.hh index 035541d7931dc26d8054583a4e84c7f611bb4369..8b71b3c1091877e841562727724c9e455b43008b 100644 --- a/test/porousmediumflow/mpnc/implicit/evaporationatmosphereproblem.hh +++ b/test/porousmediumflow/mpnc/implicit/evaporationatmosphereproblem.hh @@ -244,7 +244,6 @@ public: void init() { - eps_ = 1e-6; percentOfEquil_ = GET_RUNTIME_PARAM(TypeTag, Scalar,BoundaryConditions.percentOfEquil); nTemperature_ = GET_RUNTIME_PARAM(TypeTag, int, FluidSystem.nTemperature); nPressure_ = GET_RUNTIME_PARAM(TypeTag, int, FluidSystem.nPressure); @@ -745,7 +744,7 @@ private: { return globalPos[dimWorld-1] > this->bBoxMax()[dimWorld-1] - eps_; } private: - Scalar eps_; + static constexpr Scalar eps_ = 1e-6;; Scalar percentOfEquil_ ; int nTemperature_; int nPressure_; diff --git a/test/porousmediumflow/mpnc/implicit/evaporationatmospherespatialparams.hh b/test/porousmediumflow/mpnc/implicit/evaporationatmospherespatialparams.hh index e76893389538885c5e18134bb76e52e25e706270..bf9c2ecc9e3fe2a96d65963432d3f62524e66988 100644 --- a/test/porousmediumflow/mpnc/implicit/evaporationatmospherespatialparams.hh +++ b/test/porousmediumflow/mpnc/implicit/evaporationatmospherespatialparams.hh @@ -198,7 +198,6 @@ public: // load parameters from input file and initialize parameter values void setInputInitialize() { - eps_ = 1e-6; heightPM_ = GET_RUNTIME_PARAM(TypeTag, Scalar, Grid.InterfacePosY); heightDomain_ = GET_RUNTIME_PARAM(TypeTag, GlobalPosition, Grid.UpperRight)[1]; // BEWARE! First the input values have to be set, than the material parameters can be set @@ -547,7 +546,7 @@ public: * -> be careful with neumannAtPos */ bool inPM_(const GlobalPosition & globalPos) const - { return ( (globalPos[dimWorld-1] > 0. - 1e-6) and (globalPos[dimWorld-1] < (heightPM_ + 1e-6 ) ) ); } + { return ( (globalPos[dimWorld-1] > 0. - eps_) and (globalPos[dimWorld-1] < (heightPM_ + eps_) ) ); } /*! * \brief Give back whether the tested position (input) is a specific region (above PM / "free flow") in the domain @@ -561,7 +560,7 @@ public: * -> be careful with neumannAtPos */ bool inFF_(const GlobalPosition & globalPos) const - { return ( (globalPos[dimWorld-1] < heightDomain_ + 1e-6) and (globalPos[dimWorld-1] > (heightPM_ + 1e-6) ) ); } + { return ( (globalPos[dimWorld-1] < heightDomain_ + eps_) and (globalPos[dimWorld-1] > (heightPM_ + eps_) ) ); } /*! * \brief Give back whether the tested position (input) is a specific region (above PM / "free flow") in the domain @@ -575,14 +574,14 @@ public: * -> be careful with neumannAtPos */ bool inInjection_(const GlobalPosition & globalPos) const - { return ( (globalPos[dimWorld-1] < heightDomain_ - 0.25*heightDomain_ + 1e-6) and (globalPos[dimWorld-1] > (heightPM_ + 1e-6) ) ); } + { return ( (globalPos[dimWorld-1] < heightDomain_ - 0.25*heightDomain_ + eps_) and (globalPos[dimWorld-1] > (heightPM_ + eps_) ) ); } /*! \brief access function for the depth / height of the porous medium */ const Scalar heightPM() const { return heightPM_; } private: - Scalar eps_ ; + static constexpr Scalar eps_ = 1e-6;; Scalar heightDomain_ ; AwnSurfaceParams aWettingNonWettingSurfaceParams_; diff --git a/test/porousmediumflow/mpnc/implicit/forchheimer1pproblem.hh b/test/porousmediumflow/mpnc/implicit/forchheimer1pproblem.hh index 93f9357f6c92cc2b0c9f4fbdccc995069b9ec781..5fee54dbb0cd65f32b3ae6f552543e62d05daffe 100644 --- a/test/porousmediumflow/mpnc/implicit/forchheimer1pproblem.hh +++ b/test/porousmediumflow/mpnc/implicit/forchheimer1pproblem.hh @@ -157,7 +157,6 @@ public: pMin_ = GET_RUNTIME_PARAM(TypeTag, Scalar, Problem.pMin); outputName_ = GET_RUNTIME_PARAM(TypeTag, std::string, Problem.outputName); - eps_ = 1e-6; temperature_ = 273.15 + 25; // -> 25°C // initialize the tables of the fluid system @@ -441,7 +440,7 @@ private: { return globalPos[dimWorld-1] > this->bBoxMax()[dimWorld-1] - eps_; } Scalar temperature_; - Scalar eps_; + static constexpr Scalar eps_ = 1e-6;; std::string outputName_; Scalar pMax_, pMin_ ; diff --git a/test/porousmediumflow/mpnc/implicit/forchheimer2pproblem.hh b/test/porousmediumflow/mpnc/implicit/forchheimer2pproblem.hh index 0038bc413b63595fb885a51de80ccb01d94e2d7c..1262ed89ff76acebf3ef16671a113b8508503357 100644 --- a/test/porousmediumflow/mpnc/implicit/forchheimer2pproblem.hh +++ b/test/porousmediumflow/mpnc/implicit/forchheimer2pproblem.hh @@ -156,7 +156,6 @@ public: pMin_ = GET_RUNTIME_PARAM(TypeTag, Scalar, Problem.pMin); outputName_ = GET_RUNTIME_PARAM(TypeTag, std::string, Problem.outputName); - eps_ = 1e-6; temperature_ = 273.15 + 25; // -> 25°C // initialize the tables of the fluid system @@ -435,7 +434,7 @@ private: { return globalPos[0] > this->bBoxMax()[0] - eps_; } Scalar temperature_; - Scalar eps_; + static constexpr Scalar eps_ = 1e-6; std::string outputName_; Scalar pMax_, pMin_ ; diff --git a/test/porousmediumflow/mpnc/implicit/obstacleproblem.hh b/test/porousmediumflow/mpnc/implicit/obstacleproblem.hh index 418dec999b43944f9e4467e02298c9086dfa9607..22a700abb7b116ce6dba918dce579404528352b7 100644 --- a/test/porousmediumflow/mpnc/implicit/obstacleproblem.hh +++ b/test/porousmediumflow/mpnc/implicit/obstacleproblem.hh @@ -155,7 +155,6 @@ public: ObstacleProblem(TimeManager &timeManager, const GridView &gridView) : ParentType(timeManager, gridView) { - eps_ = 1e-6; temperature_ = 273.15 + 25; // -> 25°C // initialize the tables of the fluid system @@ -429,18 +428,18 @@ private: { Scalar x = globalPos[0]; Scalar y = globalPos[1]; - return x >= 60 - eps_ && y <= 10; + return x >= 60 - eps_ && y <= 10 + eps_; } bool onOutlet_(const GlobalPosition &globalPos) const { Scalar x = globalPos[0]; Scalar y = globalPos[1]; - return x < eps_ && y <= 10; + return x < eps_ && y <= 10 + eps_; } Scalar temperature_; - Scalar eps_; + static constexpr Scalar eps_ = 1e-6; std::string name_; }; } //end namespace diff --git a/test/porousmediumflow/mpnc/implicit/obstaclespatialparams.hh b/test/porousmediumflow/mpnc/implicit/obstaclespatialparams.hh index ed4a1931275f93dba0991a154d05e31ff1e8a4bd..0f8b7580c2d08aaba999d695a1053e1c92821d75 100644 --- a/test/porousmediumflow/mpnc/implicit/obstaclespatialparams.hh +++ b/test/porousmediumflow/mpnc/implicit/obstaclespatialparams.hh @@ -182,8 +182,8 @@ private: static bool isFineMaterial_(const DimWorldVector &pos) { return - 10 <= pos[0] && pos[0] <= 20 && - 0 <= pos[1] && pos[1] <= 35; + 10 - eps_ <= pos[0] && pos[0] <= 20 + eps_ && + 0 - eps_ <= pos[1] && pos[1] <= 35 + eps_; } Scalar coarseK_; @@ -191,6 +191,7 @@ private: Scalar porosity_; MaterialLawParams fineMaterialParams_; MaterialLawParams coarseMaterialParams_; + static constexpr Scalar eps_ = 1e-6; }; } diff --git a/test/porousmediumflow/richards/implicit/richardsanalyticalproblem.hh b/test/porousmediumflow/richards/implicit/richardsanalyticalproblem.hh index c6f41fa4dba144618cbd36ceb02e64ce777339b8..41679a2c000bdb8b42c391afd9f1f62ca14d11d7 100644 --- a/test/porousmediumflow/richards/implicit/richardsanalyticalproblem.hh +++ b/test/porousmediumflow/richards/implicit/richardsanalyticalproblem.hh @@ -145,7 +145,6 @@ public: const GridView &gridView) : ParentType(timeManager, gridView) { - eps_ = 3e-6; pnRef_ = 1e5; // air pressure name_ = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, std::string, Problem, Name); } @@ -419,7 +418,7 @@ private: return globalPos[1] > this->bBoxMax()[1] - eps_; } - Scalar eps_; + static constexpr Scalar eps_ = 3e-6; Scalar pnRef_; std::string name_; }; diff --git a/test/porousmediumflow/richards/implicit/richardslensproblem.hh b/test/porousmediumflow/richards/implicit/richardslensproblem.hh index be66fd45777b4c78d2a21ffdd2199320002b6649..acbef837da30b080264e1d5981b2080f7ead26e5 100644 --- a/test/porousmediumflow/richards/implicit/richardslensproblem.hh +++ b/test/porousmediumflow/richards/implicit/richardslensproblem.hh @@ -140,7 +140,6 @@ public: const GridView &gridView) : ParentType(timeManager, gridView) { - eps_ = 3e-6; pnRef_ = 1e5; lensLowerLeft_[0] = 1.0; @@ -335,7 +334,7 @@ private: return onUpperBoundary_(globalPos) && 0.5 < lambda && lambda < 2.0/3.0; } - Scalar eps_; + static constexpr Scalar eps_ = 3e-6; Scalar pnRef_; GlobalPosition lensLowerLeft_; diff --git a/test/porousmediumflow/richards/implicit/richardslensspatialparams.hh b/test/porousmediumflow/richards/implicit/richardslensspatialparams.hh index b518ed870f2d63c8969f749a7b27e41da70c1c03..46d85007cc1602b05947652a4a64413180006a83 100644 --- a/test/porousmediumflow/richards/implicit/richardslensspatialparams.hh +++ b/test/porousmediumflow/richards/implicit/richardslensspatialparams.hh @@ -194,7 +194,7 @@ private: bool isInLens_(const GlobalPosition &globalPos) const { for (int i = 0; i < dimWorld; ++i) { - if (globalPos[i] < lensLowerLeft_[i] || globalPos[i] > lensUpperRight_[i]) + if (globalPos[i] < lensLowerLeft_[i] - eps_ || globalPos[i] > lensUpperRight_[i] + eps_) return false; } return true; @@ -207,6 +207,7 @@ private: Scalar outerK_; MaterialLawParams lensMaterialParams_; MaterialLawParams outerMaterialParams_; + static constexpr Scalar eps_ = 3e-6; }; } // end namespace diff --git a/test/porousmediumflow/richards/implicit/richardsniconductionproblem.hh b/test/porousmediumflow/richards/implicit/richardsniconductionproblem.hh index 4d75c5aea5f786966ce0c41af3a2795d2278df6e..aa94b8250d6ff5d084a6084cb71956e9ee46fd78 100644 --- a/test/porousmediumflow/richards/implicit/richardsniconductionproblem.hh +++ b/test/porousmediumflow/richards/implicit/richardsniconductionproblem.hh @@ -130,7 +130,6 @@ class RichardsNIConductionProblem : public RichardsProblem<TypeTag> public: RichardsNIConductionProblem(TimeManager &timeManager, const GridView &gridView) : ParentType(timeManager, gridView) - , eps_(1e-6) { //initialize fluid system FluidSystem::init(); @@ -347,7 +346,7 @@ private: } Scalar temperatureHigh_; - const Scalar eps_; + static constexpr Scalar eps_ = 1e-6; std::string name_; int outputInterval_; }; diff --git a/test/porousmediumflow/richards/implicit/richardsniconvectionproblem.hh b/test/porousmediumflow/richards/implicit/richardsniconvectionproblem.hh index 7079debfad2decdd1bf1e67b2fc8d9064eb1294a..34e14263511edf227c28cea61e5c13e4017c1081 100644 --- a/test/porousmediumflow/richards/implicit/richardsniconvectionproblem.hh +++ b/test/porousmediumflow/richards/implicit/richardsniconvectionproblem.hh @@ -135,7 +135,6 @@ class RichardsNIConvectionProblem : public RichardsProblem<TypeTag> public: RichardsNIConvectionProblem(TimeManager &timeManager, const GridView &gridView) : ParentType(timeManager, gridView) - , eps_(1e-6) { //initialize fluid system FluidSystem::init(); @@ -380,7 +379,7 @@ private: Scalar pressureHigh_; Scalar pressureLow_; Scalar darcyVelocity_; - const Scalar eps_; + static constexpr Scalar eps_ = 1e-6; std::string name_; int outputInterval_; };