From 8b860aac075b8d958fccfd7e78873e5572998c82 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Fri, 5 Jul 2024 17:49:51 +0200 Subject: [PATCH] move VtkEnergyModule parameters to TypeTag-free parameter system --- opm/models/flash/flashmodel.hh | 7 ++- opm/models/immiscible/immisciblemodel.hh | 2 +- opm/models/io/vtkenergymodule.hh | 61 ++++++------------------ opm/models/ncp/ncpmodel.hh | 3 +- opm/models/ptflash/flashmodel.hh | 7 ++- opm/models/pvs/pvsmodel.hh | 3 +- 6 files changed, 23 insertions(+), 60 deletions(-) diff --git a/opm/models/flash/flashmodel.hh b/opm/models/flash/flashmodel.hh index 7a611e566..070bae613 100644 --- a/opm/models/flash/flashmodel.hh +++ b/opm/models/flash/flashmodel.hh @@ -32,8 +32,8 @@ #include -#include #include +#include #include #include @@ -44,8 +44,8 @@ #include #include #include -#include #include +#include #include #include @@ -64,8 +64,7 @@ namespace Opm::Properties { namespace TTag { //! The type tag for the isothermal single phase problems -struct FlashModel { using InheritsFrom = std::tuple; }; +struct FlashModel { using InheritsFrom = std::tuple; }; } // namespace TTag //! Use the FlashLocalResidual function for the flash model diff --git a/opm/models/immiscible/immisciblemodel.hh b/opm/models/immiscible/immisciblemodel.hh index 786e35816..c6a1401f2 100644 --- a/opm/models/immiscible/immisciblemodel.hh +++ b/opm/models/immiscible/immisciblemodel.hh @@ -60,7 +60,7 @@ namespace Opm::Properties { // Create new type tags namespace TTag { //! The generic type tag for problems using the immiscible multi-phase model -struct ImmiscibleModel { using InheritsFrom = std::tuple; }; +struct ImmiscibleModel { using InheritsFrom = std::tuple; }; //! The type tag for single-phase immiscible problems struct ImmiscibleSinglePhaseModel { using InheritsFrom = std::tuple; }; diff --git a/opm/models/io/vtkenergymodule.hh b/opm/models/io/vtkenergymodule.hh index 411c12798..414d545ce 100644 --- a/opm/models/io/vtkenergymodule.hh +++ b/opm/models/io/vtkenergymodule.hh @@ -34,51 +34,18 @@ #include -#include #include - -namespace Opm::Properties::TTag { - -// create new type tag for the VTK energy output -struct VtkEnergy {}; - -} // namespace Opm::Properties::TTag - +#include namespace Opm::Parameters { -// create the property tags needed for the energy module -template -struct VtkWriteInternalEnergies { using type = Properties::UndefinedProperty; }; - -template -struct VtkWriteEnthalpies { using type = Properties::UndefinedProperty; }; - -template -struct VtkWriteSolidInternalEnergy { using type = Properties::UndefinedProperty; }; - -template -struct VtkWriteThermalConductivity { using type = Properties::UndefinedProperty; }; - - // set default values for what quantities to output -template -struct VtkWriteSolidInternalEnergy -{ static constexpr bool value = false; }; +struct VtkWriteSolidInternalEnergy { static constexpr bool value = false; }; +struct VtkWriteThermalConductivity { static constexpr bool value = false; }; +struct VtkWriteInternalEnergies { static constexpr bool value = false; }; +struct VtkWriteEnthalpies { static constexpr bool value = false; }; -template -struct VtkWriteThermalConductivity -{ static constexpr bool value = false; }; - -template -struct VtkWriteInternalEnergies -{ static constexpr bool value = false; }; - -template -struct VtkWriteEnthalpies -{ static constexpr bool value = false; }; - -} // namespace Opm::Properties +} // namespace Opm::Parameters namespace Opm { /*! @@ -125,16 +92,16 @@ public: */ static void registerParameters() { - Parameters::registerParam + Parameters::Register ("Include the volumetric internal energy of solid" "matrix in the VTK output files"); - Parameters::registerParam + Parameters::Register ("Include the total thermal conductivity of the" "medium in the VTK output files"); - Parameters::registerParam + Parameters::Register ("Include the specific enthalpy of the phases in " "the VTK output files"); - Parameters::registerParam + Parameters::Register ("Include the specific internal energy of the " "phases in the VTK output files"); } @@ -209,25 +176,25 @@ public: private: static bool solidInternalEnergyOutput_() { - static bool val = Parameters::get(); + static bool val = Parameters::Get(); return val; } static bool thermalConductivityOutput_() { - static bool val = Parameters::get(); + static bool val = Parameters::Get(); return val; } static bool enthalpyOutput_() { - static bool val = Parameters::get(); + static bool val = Parameters::Get(); return val; } static bool internalEnergyOutput_() { - static bool val = Parameters::get(); + static bool val = Parameters::Get(); return val; } diff --git a/opm/models/ncp/ncpmodel.hh b/opm/models/ncp/ncpmodel.hh index d736ba40f..4dbaefd4d 100644 --- a/opm/models/ncp/ncpmodel.hh +++ b/opm/models/ncp/ncpmodel.hh @@ -69,8 +69,7 @@ namespace TTag { /*! * \brief Define the type tag for the compositional NCP model. */ -struct NcpModel { using InheritsFrom = std::tuple; }; +struct NcpModel { using InheritsFrom = std::tuple; }; } // namespace TTag //! Use the Ncp local jacobian operator for the compositional NCP model diff --git a/opm/models/ptflash/flashmodel.hh b/opm/models/ptflash/flashmodel.hh index 09309e340..2a1912090 100644 --- a/opm/models/ptflash/flashmodel.hh +++ b/opm/models/ptflash/flashmodel.hh @@ -35,13 +35,13 @@ #include #include -#include #include +#include -#include #include #include #include +#include #include #include @@ -69,8 +69,7 @@ namespace Opm::Properties { namespace TTag { //! The type tag for the isothermal single phase problems -struct FlashModel { using InheritsFrom = std::tuple; }; } // namespace TTag diff --git a/opm/models/pvs/pvsmodel.hh b/opm/models/pvs/pvsmodel.hh index dc96b2a85..ec165efe2 100644 --- a/opm/models/pvs/pvsmodel.hh +++ b/opm/models/pvs/pvsmodel.hh @@ -69,8 +69,7 @@ namespace TTag { //! The type tag for the isothermal single phase problems struct PvsModel { - using InheritsFrom = std::tuple; }; + using InheritsFrom = std::tuple; }; } // namespace TTag //! Use the PVS local jacobian operator for the PVS model