From 7425ddeb9c85ad3f77df9a37be79d3a595260f29 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Fri, 5 Jul 2024 17:49:51 +0200 Subject: [PATCH] move ReservoirProblem parameters to TypeTag-free parameter system --- examples/problems/reservoirproblem.hh | 49 ++++++++------------------- 1 file changed, 14 insertions(+), 35 deletions(-) diff --git a/examples/problems/reservoirproblem.hh b/examples/problems/reservoirproblem.hh index 5481fe550..5180093d4 100644 --- a/examples/problems/reservoirproblem.hh +++ b/examples/problems/reservoirproblem.hh @@ -46,6 +46,8 @@ #include +#include + #include #include @@ -124,39 +126,16 @@ public: namespace Opm::Parameters { // Maximum depth of the reservoir -template -struct MaxDepth { using type = Properties::UndefinedProperty; }; +template +struct MaxDepth { static constexpr Scalar value = 2500.0; }; // The temperature inside the reservoir -template -struct Temperature { using type = Properties::UndefinedProperty; }; +template +struct Temperature { static constexpr Scalar value = 293.15; }; // The width of producer/injector wells as a fraction of the width of the spatial domain -template -struct WellWidth { using type = Properties::UndefinedProperty; }; - -// set the defaults for some problem specific properties -template -struct MaxDepth -{ - using type = GetPropType; - static constexpr type value = 2500; -}; - -template -struct Temperature -{ - using type = GetPropType; - static constexpr type value = 293.15; -}; - -// The width of producer/injector wells as a fraction of the width of the spatial domain -template -struct WellWidth -{ - using type = GetPropType; - static constexpr type value = 0.01; -}; +template +struct WellWidth { static constexpr Scalar value = 0.01; }; } // namespace Opm::Parameters @@ -237,9 +216,9 @@ public: { ParentType::finishInit(); - temperature_ = Parameters::get(); - maxDepth_ = Parameters::get(); - wellWidth_ = Parameters::get(); + temperature_ = Parameters::Get>(); + maxDepth_ = Parameters::Get>(); + wellWidth_ = Parameters::Get>(); std::vector > Bo = { { 101353, 1.062 }, @@ -401,11 +380,11 @@ public: { ParentType::registerParameters(); - Parameters::registerParam + Parameters::Register> ("The temperature [K] in the reservoir"); - Parameters::registerParam + Parameters::Register> ("The maximum depth [m] of the reservoir"); - Parameters::registerParam + Parameters::Register> ("The width of producer/injector wells as a fraction of the width" " of the spatial domain");