move VtkPhasePresence parameters to TypeTag-free parameter system

This commit is contained in:
Arne Morten Kvarving 2024-07-05 17:49:51 +02:00
parent 4853860d46
commit 185b4d90d5
2 changed files with 3 additions and 17 deletions

View File

@ -35,22 +35,9 @@
#include <opm/models/utils/parametersystem.hh> #include <opm/models/utils/parametersystem.hh>
#include <opm/models/utils/propertysystem.hh> #include <opm/models/utils/propertysystem.hh>
namespace Opm::Properties::TTag {
// create new type tag for the VTK primary variables output
struct VtkPhasePresence {};
} // namespace Opm::Properties::TTag
namespace Opm::Parameters { namespace Opm::Parameters {
// create the property tags needed for the primary variables module struct VtkWritePhasePresence { static constexpr bool value = false; };
template<class TypeTag, class MyTypeTag>
struct VtkWritePhasePresence { using type = Properties::UndefinedProperty; };
template<class TypeTag>
struct VtkWritePhasePresence<TypeTag, Properties::TTag::VtkPhasePresence>
{ static constexpr bool value = false; };
} // namespace Opm::Parameters } // namespace Opm::Parameters
@ -86,7 +73,7 @@ public:
*/ */
static void registerParameters() static void registerParameters()
{ {
Parameters::registerParam<TypeTag, Parameters::VtkWritePhasePresence> Parameters::Register<Parameters::VtkWritePhasePresence>
("Include the phase presence pseudo primary " ("Include the phase presence pseudo primary "
"variable in the VTK output files"); "variable in the VTK output files");
} }
@ -137,7 +124,7 @@ public:
private: private:
static bool phasePresenceOutput_() static bool phasePresenceOutput_()
{ {
static bool val = Parameters::get<TypeTag, Parameters::VtkWritePhasePresence>(); static bool val = Parameters::Get<Parameters::VtkWritePhasePresence>();
return val; return val;
} }

View File

@ -70,7 +70,6 @@ namespace TTag {
struct PvsModel struct PvsModel
{ {
using InheritsFrom = std::tuple<VtkEnergy, using InheritsFrom = std::tuple<VtkEnergy,
VtkPhasePresence,
MultiPhaseBaseModel>; }; MultiPhaseBaseModel>; };
} // namespace TTag } // namespace TTag