using EWOMS_GET_PARAM for the PTFlash related run-time arguments

This commit is contained in:
Kai Bao 2023-10-31 14:56:49 +01:00
parent 9f0fb32713
commit 76899d3751
2 changed files with 5 additions and 5 deletions

View File

@ -107,9 +107,9 @@ public:
const auto& priVars = elemCtx.primaryVars(dofIdx, timeIdx);
const auto& problem = elemCtx.problem();
constexpr Scalar flashTolerance = getPropValue<TypeTag, Properties::FlashTolerance>();
constexpr int flashVerbosity = getPropValue<TypeTag, Properties::FlashVerbosity>();
const std::string flashTwoPhaseMethod = getPropValue<TypeTag, Properties::FlashTwoPhaseMethod>();
const Scalar flashTolerance = EWOMS_GET_PARAM(TypeTag, Scalar, FlashTolerance);
const int flashVerbosity = EWOMS_GET_PARAM(TypeTag, int, FlashVerbosity);
const std::string flashTwoPhaseMethod = EWOMS_GET_PARAM(TypeTag, std::string, FlashTwoPhaseMethod);
// extract the total molar densities of the components
ComponentVector z(0.);

View File

@ -95,7 +95,7 @@ struct FlashTolerance<TypeTag, TTag::FlashModel>
template<class TypeTag>
struct FlashVerbosity<TypeTag, TTag::FlashModel> { static constexpr int value = 0; };
// Flash two-phase method
// Flash two-phase method
template<class TypeTag>
struct FlashTwoPhaseMethod<TypeTag, TTag::FlashModel> { static constexpr auto value = "ssi"; };
@ -238,7 +238,7 @@ public:
"consider the solution converged");
EWOMS_REGISTER_PARAM(TypeTag, int, FlashVerbosity,
"Flash solver verbosity level");
EWOMS_REGISTER_PARAM(TypeTag, std::string, FlashTwoPhaseMethod,
EWOMS_REGISTER_PARAM(TypeTag, std::string, FlashTwoPhaseMethod,
"Method for solving vapor-liquid composition. Available options include:"
"ssi, newton, ssi+newton");
}