From d2096030e529eed47860c486208257597e68c3c7 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Fri, 5 Jul 2024 17:49:51 +0200 Subject: [PATCH] move FlashTwoPhaseMethod to TypeTag-free parameter system --- opm/models/ptflash/flashintensivequantities.hh | 2 +- opm/models/ptflash/flashmodel.hh | 7 +------ opm/models/ptflash/flashparameters.hh | 3 +-- opm/models/utils/parametersystem.hh | 3 +-- 4 files changed, 4 insertions(+), 11 deletions(-) diff --git a/opm/models/ptflash/flashintensivequantities.hh b/opm/models/ptflash/flashintensivequantities.hh index 304844ca4..e2f856921 100644 --- a/opm/models/ptflash/flashintensivequantities.hh +++ b/opm/models/ptflash/flashintensivequantities.hh @@ -112,7 +112,7 @@ public: const Scalar flashTolerance = Parameters::Get>(); const int flashVerbosity = Parameters::get(); - const std::string flashTwoPhaseMethod = Parameters::get(); + const std::string flashTwoPhaseMethod = Parameters::Get(); // extract the total molar densities of the components ComponentVector z(0.); diff --git a/opm/models/ptflash/flashmodel.hh b/opm/models/ptflash/flashmodel.hh index cbb9dbc44..25cd93c57 100644 --- a/opm/models/ptflash/flashmodel.hh +++ b/opm/models/ptflash/flashmodel.hh @@ -156,11 +156,6 @@ template struct EnableThermodynamicHints { static constexpr bool value = true; }; -// Flash two-phase method -template -struct FlashTwoPhaseMethod -{ static constexpr auto value = "ssi"; }; - // Flash solver verbosity template struct FlashVerbosity @@ -258,7 +253,7 @@ public: "consider the solution converged"); Parameters::registerParam ("Flash solver verbosity level"); - Parameters::registerParam + Parameters::Register ("Method for solving vapor-liquid composition. Available options include: " "ssi, newton, ssi+newton"); diff --git a/opm/models/ptflash/flashparameters.hh b/opm/models/ptflash/flashparameters.hh index ac1543c08..094636537 100644 --- a/opm/models/ptflash/flashparameters.hh +++ b/opm/models/ptflash/flashparameters.hh @@ -37,8 +37,7 @@ namespace Opm::Parameters { //! Two-phase flash method -template -struct FlashTwoPhaseMethod { using type = Properties::UndefinedProperty; }; +struct FlashTwoPhaseMethod { static constexpr auto value = "ssi"; }; //! The verbosity level of the flash solver template diff --git a/opm/models/utils/parametersystem.hh b/opm/models/utils/parametersystem.hh index e8471c116..b9b208c20 100644 --- a/opm/models/utils/parametersystem.hh +++ b/opm/models/utils/parametersystem.hh @@ -100,8 +100,7 @@ struct ParamInfo return other.paramName == paramName && other.paramTypeName == paramTypeName && other.typeTagName == typeTagName - && other.usageString == usageString - && other.compileTimeValue == compileTimeValue; + && other.usageString == usageString; } };