From 4853860d46cd79bc6c5619bdff727d33ccb3699d Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Fri, 5 Jul 2024 17:49:51 +0200 Subject: [PATCH] move VtkBlackoilEnergyModule parameters to TypeTag-free parameter system --- opm/models/blackoil/blackoilmodel.hh | 3 +- opm/models/io/vtkblackoilenergymodule.hh | 55 ++++++------------------ 2 files changed, 13 insertions(+), 45 deletions(-) diff --git a/opm/models/blackoil/blackoilmodel.hh b/opm/models/blackoil/blackoilmodel.hh index 4af7b4bd5..0c6e32ef3 100644 --- a/opm/models/blackoil/blackoilmodel.hh +++ b/opm/models/blackoil/blackoilmodel.hh @@ -73,8 +73,7 @@ namespace Opm::Properties { namespace TTag { //! The type tag for the black-oil problems -struct BlackOilModel { using InheritsFrom = std::tuple #include -namespace Opm::Properties::TTag { - -// create new type tag for the VTK multi-phase output -struct VtkBlackOilEnergy {}; - -} // namespace Opm::Properties::TTag - namespace Opm::Parameters { -// create the property tags needed for the energy module -template -struct VtkWriteRockInternalEnergy { using type = Properties::UndefinedProperty; }; - -template -struct VtkWriteTotalThermalConductivity { using type = Properties::UndefinedProperty; }; - -template -struct VtkWriteFluidInternalEnergies { using type = Properties::UndefinedProperty; }; - -template -struct VtkWriteFluidEnthalpies { using type = Properties::UndefinedProperty; }; - // set default values for what quantities to output -template -struct VtkWriteRockInternalEnergy -{ static constexpr bool value = true; }; - -template -struct VtkWriteTotalThermalConductivity -{ static constexpr bool value = true; }; - -template -struct VtkWriteFluidInternalEnergies -{ static constexpr bool value = true; }; - -template -struct VtkWriteFluidEnthalpies -{ static constexpr bool value = true; }; +struct VtkWriteRockInternalEnergy { static constexpr bool value = true; }; +struct VtkWriteTotalThermalConductivity { static constexpr bool value = true; }; +struct VtkWriteFluidInternalEnergies { static constexpr bool value = true; }; +struct VtkWriteFluidEnthalpies { static constexpr bool value = true; }; } // namespace Opm::Parameters @@ -123,15 +92,15 @@ public: if (!enableEnergy) return; - Parameters::registerParam + Parameters::Register ("Include the volumetric internal energy of rock " "in the VTK output files"); - Parameters::registerParam + Parameters::Register ("Include the total thermal conductivity of the medium and the fluids " "in the VTK output files"); - Parameters::registerParam + Parameters::Register ("Include the internal energies of the fluids in the VTK output files"); - Parameters::registerParam + Parameters::Register ("Include the enthalpies of the fluids in the VTK output files"); } @@ -225,25 +194,25 @@ public: private: static bool rockInternalEnergyOutput_() { - static bool val = Parameters::get(); + static bool val = Parameters::Get(); return val; } static bool totalThermalConductivityOutput_() { - static bool val = Parameters::get(); + static bool val = Parameters::Get(); return val; } static bool fluidInternalEnergiesOutput_() { - static bool val = Parameters::get(); + static bool val = Parameters::Get(); return val; } static bool fluidEnthalpiesOutput_() { - static bool val = Parameters::get(); + static bool val = Parameters::Get(); return val; }