From 3c92550f742e7cdbe669050a187b7b4506631d5a Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Fri, 5 Jul 2024 17:49:51 +0200 Subject: [PATCH] move VtkSolventModule parameters to TypeTag-free parameter system --- opm/models/blackoil/blackoilmodel.hh | 54 +++++++++--------- opm/models/io/vtkblackoilsolventmodule.hh | 67 +++++------------------ 2 files changed, 42 insertions(+), 79 deletions(-) diff --git a/opm/models/blackoil/blackoilmodel.hh b/opm/models/blackoil/blackoilmodel.hh index 0c6e32ef3..b3305bd96 100644 --- a/opm/models/blackoil/blackoilmodel.hh +++ b/opm/models/blackoil/blackoilmodel.hh @@ -30,51 +30,51 @@ #include -#include "blackoilproblem.hh" -#include "blackoilindices.hh" -#include "blackoiltwophaseindices.hh" -#include "blackoilextensivequantities.hh" -#include "blackoilprimaryvariables.hh" -#include "blackoilintensivequantities.hh" -#include "blackoilratevector.hh" -#include "blackoilboundaryratevector.hh" -#include "blackoillocalresidual.hh" -#include "blackoilnewtonmethod.hh" -#include "blackoilproperties.hh" -#include "blackoilsolventmodules.hh" -#include "blackoilpolymermodules.hh" -#include "blackoilfoammodules.hh" -#include "blackoilbrinemodules.hh" -#include "blackoilextbomodules.hh" -#include "blackoildarcyfluxmodule.hh" -#include "blackoilmicpmodules.hh" +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include -#include -#include "blackoildiffusionmodule.hh" -#include "blackoildispersionmodule.hh" -#include -#include +#include +#include +#include #include #include namespace Opm { + template class BlackOilModel; -template -class EclVanguard; } namespace Opm::Properties { namespace TTag { + //! The type tag for the black-oil problems struct BlackOilModel { using InheritsFrom = std::tuple; }; diff --git a/opm/models/io/vtkblackoilsolventmodule.hh b/opm/models/io/vtkblackoilsolventmodule.hh index 3b4c5adea..acb47519a 100644 --- a/opm/models/io/vtkblackoilsolventmodule.hh +++ b/opm/models/io/vtkblackoilsolventmodule.hh @@ -41,51 +41,14 @@ #include #include -namespace Opm::Properties::TTag { - -// create new type tag for the VTK multi-phase output -struct VtkBlackOilSolvent {}; - -} // namespace Opm::Properties::TTag - namespace Opm::Parameters { -// create the property tags needed for the solvent output module -template -struct VtkWriteSolventSaturation { using type = Properties::UndefinedProperty; }; - -template -struct VtkWriteSolventRsw { using type = Properties::UndefinedProperty; }; - -template -struct VtkWriteSolventDensity { using type = Properties::UndefinedProperty; }; -template - -struct VtkWriteSolventViscosity { using type = Properties::UndefinedProperty; }; - -template -struct VtkWriteSolventMobility { using type = Properties::UndefinedProperty; }; - // set default values for what quantities to output -template -struct VtkWriteSolventSaturation -{ static constexpr bool value = true; }; - -template -struct VtkWriteSolventRsw -{ static constexpr bool value = true; }; - -template -struct VtkWriteSolventDensity -{ static constexpr bool value = true; }; - -template -struct VtkWriteSolventViscosity -{ static constexpr bool value = true; }; - -template -struct VtkWriteSolventMobility -{ static constexpr bool value = true; }; +struct VtkWriteSolventSaturation { static constexpr bool value = true; }; +struct VtkWriteSolventRsw { static constexpr bool value = true; }; +struct VtkWriteSolventDensity { static constexpr bool value = true; }; +struct VtkWriteSolventViscosity { static constexpr bool value = true; }; +struct VtkWriteSolventMobility { static constexpr bool value = true; }; } // namespace Opm::Properties @@ -127,19 +90,19 @@ public: if (!enableSolvent) return; - Parameters::registerParam + Parameters::Register ("Include the \"saturation\" of the solvent component " "in the VTK output files"); - Parameters::registerParam + Parameters::Register ("Include the \"dissolved volume in water\" of the solvent component " "in the VTK output files"); - Parameters::registerParam + Parameters::Register ("Include the \"density\" of the solvent component " "in the VTK output files"); - Parameters::registerParam + Parameters::Register ("Include the \"viscosity\" of the solvent component " "in the VTK output files"); - Parameters::registerParam + Parameters::Register ("Include the \"mobility\" of the solvent component " "in the VTK output files"); } @@ -240,31 +203,31 @@ public: private: static bool solventSaturationOutput_() { - static bool val = Parameters::get(); + static bool val = Parameters::Get(); return val; } static bool solventRswOutput_() { - static bool val = Parameters::get(); + static bool val = Parameters::Get(); return val; } static bool solventDensityOutput_() { - static bool val = Parameters::get(); + static bool val = Parameters::Get(); return val; } static bool solventViscosityOutput_() { - static bool val = Parameters::get(); + static bool val = Parameters::Get(); return val; } static bool solventMobilityOutput_() { - static bool val = Parameters::get(); + static bool val = Parameters::Get(); return val; }