From 5c108be7f307d63b66fa60a30952cfc6f7ca8eac Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Fri, 5 Jul 2024 17:49:51 +0200 Subject: [PATCH] move VtkPtFlashModule parameters to TypeTag-free parameter system --- examples/problems/co2ptflashproblem.hh | 10 ++----- opm/models/io/vtkptflashmodule.hh | 39 +++++++------------------- opm/models/ptflash/flashmodel.hh | 3 +- 3 files changed, 13 insertions(+), 39 deletions(-) diff --git a/examples/problems/co2ptflashproblem.hh b/examples/problems/co2ptflashproblem.hh index 0926c9091..ed6b332d0 100644 --- a/examples/problems/co2ptflashproblem.hh +++ b/examples/problems/co2ptflashproblem.hh @@ -202,14 +202,6 @@ struct SimulationName static constexpr type value = 423.25; // TODO }; -template -struct VtkWriteEquilibriumConstants -{ static constexpr bool value = true; }; - -template -struct VtkWriteLiquidMoleFractions -{ static constexpr bool value = true; }; - } // namespace Opm::Parameters namespace Opm { @@ -350,6 +342,8 @@ public: Parameters::SetDefault(true); Parameters::SetDefault(true); Parameters::SetDefault(true); + Parameters::SetDefault(true); + Parameters::SetDefault(true); } /*! diff --git a/opm/models/io/vtkptflashmodule.hh b/opm/models/io/vtkptflashmodule.hh index f8b9758c1..cb25f1e0d 100644 --- a/opm/models/io/vtkptflashmodule.hh +++ b/opm/models/io/vtkptflashmodule.hh @@ -27,40 +27,21 @@ #ifndef OPM_VTK_PTFLASH_MODULE_HH #define OPM_VTK_PTFLASH_MODULE_HH -#include "vtkmultiwriter.hh" -#include "baseoutputmodule.hh" - #include #include -#include +#include +#include + #include - -namespace Opm::Properties::TTag { - -// create new type tag for the VTK PTFlash output -struct VtkPTFlash {}; - -} // namespace Opm::Properties::TTag +#include namespace Opm::Parameters { -// create the property tags needed for the composition module -template -struct VtkWriteLiquidMoleFractions { using type = Properties::UndefinedProperty; }; - -template -struct VtkWriteEquilibriumConstants { using type = Properties::UndefinedProperty; }; - // set default values for what quantities to output -template -struct VtkWriteLiquidMoleFractions -{ static constexpr bool value = false; }; - -template -struct VtkWriteEquilibriumConstants -{ static constexpr bool value = false; }; +struct VtkWriteLiquidMoleFractions { static constexpr bool value = false; }; +struct VtkWriteEquilibriumConstants { static constexpr bool value = false; }; } // namespace Opm::Parameters @@ -105,9 +86,9 @@ public: */ static void registerParameters() { - Parameters::registerParam + Parameters::Register ("Include liquid mole fractions (L) in the VTK output files"); - Parameters::registerParam + Parameters::Register ("Include equilibrium constants (K) in the VTK output files"); } @@ -169,13 +150,13 @@ public: private: static bool LOutput_() { - static bool val = Parameters::get(); + static bool val = Parameters::Get(); return val; } static bool equilConstOutput_() { - static bool val = Parameters::get(); + static bool val = Parameters::Get(); return val; } diff --git a/opm/models/ptflash/flashmodel.hh b/opm/models/ptflash/flashmodel.hh index 2a1912090..3d87ba365 100644 --- a/opm/models/ptflash/flashmodel.hh +++ b/opm/models/ptflash/flashmodel.hh @@ -69,8 +69,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