diff --git a/examples/problems/co2injectionproblem.hh b/examples/problems/co2injectionproblem.hh index aa174b44a..77aade79c 100644 --- a/examples/problems/co2injectionproblem.hh +++ b/examples/problems/co2injectionproblem.hh @@ -169,11 +169,6 @@ struct Temperature { using type = Properties::UndefinedProperty; }; template struct SimulationName { using type = Properties::UndefinedProperty; }; -// Enable gravity -template -struct EnableGravity -{ static constexpr bool value = true; }; - template struct FluidSystemNumPressure { static constexpr unsigned value = 100; }; @@ -396,8 +391,8 @@ public: Parameters::SetDefault("data/co2injection.dgf"); Parameters::SetDefault>(1e4); Parameters::SetDefault>(250); - Parameters::SetDefault>(Scalar{Co2InjectionTolerance}); + Parameters::SetDefault(true); } /*! diff --git a/examples/problems/co2ptflashproblem.hh b/examples/problems/co2ptflashproblem.hh index ed6b332d0..84cc7633b 100644 --- a/examples/problems/co2ptflashproblem.hh +++ b/examples/problems/co2ptflashproblem.hh @@ -156,11 +156,6 @@ struct EpisodeLength { using type = Properties::UndefinedProperty;}; template struct Initialpressure { using type = Properties::UndefinedProperty;}; -// Enable gravity false -template -struct EnableGravity -{ static constexpr bool value = false; }; - // this is kinds of telling the report step length template struct EpisodeLength diff --git a/examples/problems/cuvetteproblem.hh b/examples/problems/cuvetteproblem.hh index b8f248323..b3af92b57 100644 --- a/examples/problems/cuvetteproblem.hh +++ b/examples/problems/cuvetteproblem.hh @@ -114,15 +114,6 @@ public: } // namespace Opm::Properties -namespace Opm::Parameters { - -// Enable gravity -template -struct EnableGravity -{ static constexpr bool value = true; }; - -} // namespace Opm::Parameters - namespace Opm { /*! * \ingroup TestProblems @@ -291,6 +282,7 @@ public: Parameters::SetDefault>(100.0); Parameters::SetDefault>(1.0); Parameters::SetDefault>(600.0); + Parameters::SetDefault(true); } /*! diff --git a/examples/problems/diffusionproblem.hh b/examples/problems/diffusionproblem.hh index e4b480e89..879a7152e 100644 --- a/examples/problems/diffusionproblem.hh +++ b/examples/problems/diffusionproblem.hh @@ -108,15 +108,6 @@ struct EnableDiffusion { static constexpr b } // namespace Opm::Properties -namespace Opm::Parameters { - -// Disable gravity -template -struct EnableGravity -{ static constexpr bool value = false; }; - -} // namespace Opm::Parameters - namespace Opm { /*! * \ingroup TestProblems diff --git a/examples/problems/fingerproblem.hh b/examples/problems/fingerproblem.hh index d3750585b..e454c8c4d 100644 --- a/examples/problems/fingerproblem.hh +++ b/examples/problems/fingerproblem.hh @@ -28,32 +28,38 @@ #ifndef EWOMS_FINGER_PROBLEM_HH #define EWOMS_FINGER_PROBLEM_HH -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - #if HAVE_DUNE_ALUGRID #include #endif -#include -#include #include +#include +#include + #include -#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include + +#include + +#include +#include + +#include + +#include + #include namespace Opm { @@ -131,11 +137,6 @@ namespace Opm::Parameters { template struct InitialWaterSaturation { using type = Properties::UndefinedProperty; }; -// Enable gravity -template -struct EnableGravity -{ static constexpr bool value = true; }; - template struct InitialWaterSaturation { @@ -278,6 +279,7 @@ public: Parameters::SetDefault>(215); Parameters::SetDefault>(10); + Parameters::SetDefault(true); } /*! diff --git a/examples/problems/fractureproblem.hh b/examples/problems/fractureproblem.hh index 83ba3986e..e0f34907b 100644 --- a/examples/problems/fractureproblem.hh +++ b/examples/problems/fractureproblem.hh @@ -158,15 +158,6 @@ struct EnableConstraints { static constexpr bool } // namespace Opm::Properties -namespace Opm::Parameters { - -// Disable gravity -template -struct EnableGravity -{ static constexpr bool value = false; }; - -} // namespace Opm::Parameters - namespace Opm { /*! * \ingroup TestProblems diff --git a/examples/problems/groundwaterproblem.hh b/examples/problems/groundwaterproblem.hh index 5e37f3e12..2ec50dd7a 100644 --- a/examples/problems/groundwaterproblem.hh +++ b/examples/problems/groundwaterproblem.hh @@ -28,19 +28,22 @@ #ifndef EWOMS_GROUND_WATER_PROBLEM_HH #define EWOMS_GROUND_WATER_PROBLEM_HH -#include -#include +#include +#include +#include + +#include +#include #include #include #include -#include -#include +#include -#include -#include -#include +#include + +#include #include #include @@ -112,11 +115,6 @@ struct Permeability { using type = Properties::UndefinedProperty; }; template struct PermeabilityLens { using type = Properties::UndefinedProperty; }; -// Enable gravity -template -struct EnableGravity -{ static constexpr bool value = true; }; - template struct LensLowerLeftX { @@ -289,6 +287,7 @@ public: Parameters::SetDefault("./data/groundwater_2d.dgf"); Parameters::SetDefault>(1.0); Parameters::SetDefault>(1.0); + Parameters::SetDefault(true); } /*! diff --git a/examples/problems/infiltrationproblem.hh b/examples/problems/infiltrationproblem.hh index 36548b353..cbae93e5a 100644 --- a/examples/problems/infiltrationproblem.hh +++ b/examples/problems/infiltrationproblem.hh @@ -27,21 +27,25 @@ #ifndef EWOMS_INFILTRATION_PROBLEM_HH #define EWOMS_INFILTRATION_PROBLEM_HH -#include - -#include -#include -#include -#include -#include -#include +#include +#include +#include #include #include -#include -#include -#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include #include #include @@ -90,15 +94,6 @@ public: } // namespace Opm::Properties -namespace Opm::Parameters { - -// Enable gravity? -template -struct EnableGravity -{ static constexpr bool value = true; }; - -} // namespace Opm::Parameters - namespace Opm { /*! * \ingroup TestProblems @@ -224,6 +219,7 @@ public: Parameters::SetDefault(1); Parameters::SetDefault>(6e3); Parameters::SetDefault>(60.0); + Parameters::SetDefault(true); } /*! diff --git a/examples/problems/lensproblem.hh b/examples/problems/lensproblem.hh index 02dd73f77..f06d01b16 100644 --- a/examples/problems/lensproblem.hh +++ b/examples/problems/lensproblem.hh @@ -143,11 +143,6 @@ struct LensUpperRightY { using type = Properties::UndefinedProperty; }; template struct LensUpperRightZ { using type = Properties::UndefinedProperty; }; -// Enable gravity -template -struct EnableGravity -{ static constexpr bool value = true; }; - // define the properties specific for the lens problem template struct LensLowerLeftX @@ -358,6 +353,7 @@ public: Parameters::SetDefault(true); Parameters::SetDefault>(250.0); Parameters::SetDefault(true); + Parameters::SetDefault(true); } /*! diff --git a/examples/problems/obstacleproblem.hh b/examples/problems/obstacleproblem.hh index eb299f702..306833f80 100644 --- a/examples/problems/obstacleproblem.hh +++ b/examples/problems/obstacleproblem.hh @@ -28,28 +28,30 @@ #ifndef EWOMS_OBSTACLE_PROBLEM_HH #define EWOMS_OBSTACLE_PROBLEM_HH -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include #include #include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include #include #include -#include namespace Opm { template @@ -113,15 +115,6 @@ struct SolidEnergyLaw } // namespace Opm::Properties -namespace Opm::Parameters { - -// Enable gravity -template -struct EnableGravity -{ static constexpr bool value = true; }; - -} // namespace Opm::Parameters - namespace Opm { /*! * \ingroup TestProblems @@ -268,6 +261,7 @@ public: Parameters::SetDefault("./data/obstacle_24x16.dgf"); Parameters::SetDefault>(1e4); Parameters::SetDefault>(250); + Parameters::SetDefault(true); } /*! diff --git a/examples/problems/outflowproblem.hh b/examples/problems/outflowproblem.hh index 04009c6ec..4e52b5365 100644 --- a/examples/problems/outflowproblem.hh +++ b/examples/problems/outflowproblem.hh @@ -74,15 +74,6 @@ public: } // namespace Opm::Properties -namespace Opm::Parameters { - -// Disable gravity -template -struct EnableGravity -{ static constexpr bool value = false; }; - -} // namespace Opm::Parameters - namespace Opm { /*! * \ingroup TestProblems diff --git a/examples/problems/powerinjectionproblem.hh b/examples/problems/powerinjectionproblem.hh index 7971b599b..1bda5db62 100644 --- a/examples/problems/powerinjectionproblem.hh +++ b/examples/problems/powerinjectionproblem.hh @@ -121,15 +121,6 @@ public: } // namespace Opm::Properties -namespace Opm::Parameters { - -// Disable gravity -template -struct EnableGravity -{ static constexpr bool value = false; }; - -} // namespace Opm::Parameters - namespace Opm { /*! * \ingroup TestProblems diff --git a/examples/problems/reservoirproblem.hh b/examples/problems/reservoirproblem.hh index da41b8611..5481fe550 100644 --- a/examples/problems/reservoirproblem.hh +++ b/examples/problems/reservoirproblem.hh @@ -135,11 +135,6 @@ struct Temperature { using type = Properties::UndefinedProperty; }; template struct WellWidth { using type = Properties::UndefinedProperty; }; -// Enable gravity -template -struct EnableGravity -{ static constexpr bool value = true; }; - // set the defaults for some problem specific properties template struct MaxDepth @@ -425,6 +420,8 @@ public: Parameters::SetDefault>(100e3); // increase the tolerance for this problem to get larger time steps Parameters::SetDefault>(1e-6); + + Parameters::SetDefault(true); } /*! diff --git a/examples/problems/richardslensproblem.hh b/examples/problems/richardslensproblem.hh index 2fc9fc417..0e8b24e26 100644 --- a/examples/problems/richardslensproblem.hh +++ b/examples/problems/richardslensproblem.hh @@ -101,15 +101,6 @@ public: } // namespace Opm::Properties -namespace Opm::Parameters { - -// Enable gravitational acceleration -template -struct EnableGravity -{ static constexpr bool value = true; }; - -} // namespace Opm::Parameters - namespace Opm { /*! @@ -246,6 +237,7 @@ public: Parameters::SetDefault>(100.0); Parameters::SetDefault(28); Parameters::SetDefault(18); + Parameters::SetDefault(true); } /*! diff --git a/examples/problems/waterairproblem.hh b/examples/problems/waterairproblem.hh index 3d375468b..69ba01110 100644 --- a/examples/problems/waterairproblem.hh +++ b/examples/problems/waterairproblem.hh @@ -135,11 +135,6 @@ struct PreconditionerWrapper namespace Opm::Parameters { -// Enable gravity -template -struct EnableGravity -{ static constexpr bool value = true; }; - template struct PreconditionerOrder { static constexpr int value = 2; }; @@ -302,6 +297,7 @@ public: Parameters::SetDefault>(1.0 * 365 * 24 * 60 * 60); Parameters::SetDefault>(250.0); + Parameters::SetDefault(true); } /*! diff --git a/examples/tutorial1problem.hh b/examples/tutorial1problem.hh index e58b0ce14..f7e7a13a5 100644 --- a/examples/tutorial1problem.hh +++ b/examples/tutorial1problem.hh @@ -122,16 +122,8 @@ public: } // namespace Opm::Properties -namespace Opm::Parameters { - -// Disable gravity -template -struct EnableGravity -{ static constexpr bool value = false; }; /*@\label{tutorial1:gravity}@*/ - -} // namespace Opm::Parameters - namespace Opm { + //! Tutorial problem using the "immiscible" model. template class Tutorial1Problem diff --git a/opm/models/blackoil/blackoilfoammodules.hh b/opm/models/blackoil/blackoilfoammodules.hh index 1030b2e87..737d554b8 100644 --- a/opm/models/blackoil/blackoilfoammodules.hh +++ b/opm/models/blackoil/blackoilfoammodules.hh @@ -189,7 +189,7 @@ public: Simulator&) { if constexpr (enableFoam) { - if (Parameters::get()) { + if (Parameters::Get()) { OpmLog::warning("VTK output requested, currently unsupported by the foam module."); } } diff --git a/opm/models/blackoil/blackoilsolventmodules.hh b/opm/models/blackoil/blackoilsolventmodules.hh index 19b4acdc9..b0052e506 100644 --- a/opm/models/blackoil/blackoilsolventmodules.hh +++ b/opm/models/blackoil/blackoilsolventmodules.hh @@ -1369,7 +1369,7 @@ public: Valgrind::CheckDefined(solventPGrad); // correct the pressure gradients by the gravitational acceleration - if (Parameters::get()) { + if (Parameters::Get()) { // estimate the gravitational acceleration at a given SCV face // using the arithmetic mean const auto& gIn = elemCtx.problem().gravity(elemCtx, i, timeIdx); diff --git a/opm/models/common/darcyfluxmodule.hh b/opm/models/common/darcyfluxmodule.hh index 13bb70bd3..aef4789a8 100644 --- a/opm/models/common/darcyfluxmodule.hh +++ b/opm/models/common/darcyfluxmodule.hh @@ -212,7 +212,7 @@ protected: } // correct the pressure gradients by the gravitational acceleration - if (Parameters::get()) { + if (Parameters::Get()) { // estimate the gravitational acceleration at a given SCV face // using the arithmetic mean const auto& gIn = elemCtx.problem().gravity(elemCtx, i, timeIdx); @@ -362,7 +362,7 @@ protected: K_ = intQuantsIn.intrinsicPermeability(); // correct the pressure gradients by the gravitational acceleration - if (Parameters::get()) { + if (Parameters::Get()) { // estimate the gravitational acceleration at a given SCV face // using the arithmetic mean const auto& gIn = elemCtx.problem().gravity(elemCtx, i, timeIdx); diff --git a/opm/models/common/multiphasebasemodel.hh b/opm/models/common/multiphasebasemodel.hh index 28df0ba13..1d251ac73 100644 --- a/opm/models/common/multiphasebasemodel.hh +++ b/opm/models/common/multiphasebasemodel.hh @@ -141,15 +141,6 @@ struct ThermalConductionLawParams } // namespace Opm::Properties -namespace Opm::Parameters { - -//! disable gravity by default -template -struct EnableGravity -{ static constexpr bool value = false; }; - -} - namespace Opm { /*! diff --git a/opm/models/common/multiphasebaseparameters.hh b/opm/models/common/multiphasebaseparameters.hh index f03dfc665..62582f166 100644 --- a/opm/models/common/multiphasebaseparameters.hh +++ b/opm/models/common/multiphasebaseparameters.hh @@ -24,19 +24,16 @@ * \file * \ingroup MultiPhaseBaseModel * - * \brief Defines the common paramamters for the porous medium + * \brief Defines the common parameters for the porous medium * multi-phase models. */ #ifndef EWOMS_MULTI_PHASE_BASE_PARAMETERS_HH #define EWOMS_MULTI_PHASE_BASE_PARAMETERS_HH -#include - namespace Opm::Parameters { -//! Returns whether gravity is considered in the problem -template -struct EnableGravity { using type = Properties::UndefinedProperty; }; +//! Returns whether gravity is considered in the problem. +struct EnableGravity { static constexpr bool value = false; }; } // namespace Opm::Parameters diff --git a/opm/models/common/multiphasebaseproblem.hh b/opm/models/common/multiphasebaseproblem.hh index 8c71d4df3..3b6103eab 100644 --- a/opm/models/common/multiphasebaseproblem.hh +++ b/opm/models/common/multiphasebaseproblem.hh @@ -93,7 +93,7 @@ public: { ParentType::registerParameters(); - Parameters::registerParam + Parameters::Register ("Use the gravity correction for the pressure gradients."); } @@ -398,8 +398,9 @@ private: void init_() { gravity_ = 0.0; - if (Parameters::get()) + if (Parameters::Get()) { gravity_[dimWorld-1] = -9.81; + } } };