move FlashVerbosity to TypeTag-free parameter system

This commit is contained in:
Arne Morten Kvarving 2024-07-05 17:49:51 +02:00
parent d2096030e5
commit ac4c723da7
3 changed files with 3 additions and 11 deletions

View File

@ -111,7 +111,7 @@ public:
const auto& problem = elemCtx.problem();
const Scalar flashTolerance = Parameters::Get<Parameters::FlashTolerance<Scalar>>();
const int flashVerbosity = Parameters::get<TypeTag, Parameters::FlashVerbosity>();
const int flashVerbosity = Parameters::Get<Parameters::FlashVerbosity>();
const std::string flashTwoPhaseMethod = Parameters::Get<Parameters::FlashTwoPhaseMethod>();
// extract the total molar densities of the components

View File

@ -156,11 +156,6 @@ template<class TypeTag>
struct EnableThermodynamicHints<TypeTag, Properties::TTag::FlashModel>
{ static constexpr bool value = true; };
// Flash solver verbosity
template<class TypeTag>
struct FlashVerbosity<TypeTag, Properties::TTag::FlashModel>
{ static constexpr int value = 0; };
} // namespace Opm::Parameters
namespace Opm {
@ -251,7 +246,7 @@ public:
Parameters::Register<Parameters::FlashTolerance<Scalar>>
("The maximum tolerance for the flash solver to "
"consider the solution converged");
Parameters::registerParam<TypeTag, Parameters::FlashVerbosity>
Parameters::Register<Parameters::FlashVerbosity>
("Flash solver verbosity level");
Parameters::Register<Parameters::FlashTwoPhaseMethod>
("Method for solving vapor-liquid composition. Available options include: "

View File

@ -32,16 +32,13 @@
#include <opm/models/flash/flashparameters.hh>
#include <opm/models/utils/propertysystem.hh>
namespace Opm::Parameters {
//! Two-phase flash method
struct FlashTwoPhaseMethod { static constexpr auto value = "ssi"; };
//! The verbosity level of the flash solver
template<class TypeTag, class MyTypeTag>
struct FlashVerbosity { using type = Properties::UndefinedProperty; };
struct FlashVerbosity { static constexpr int value = 0; };
} // namespace Opm::Parameters