From bd582e81509f2e75979bb73df2837d156d33f88d Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Fri, 5 Jul 2024 17:49:51 +0200 Subject: [PATCH] move VtkPrimaryVars parameters to TypeTag-free parameter system --- .../discretization/common/fvbaseproperties.hh | 3 +- opm/models/io/vtkprimaryvarsmodule.hh | 43 ++++--------------- 2 files changed, 10 insertions(+), 36 deletions(-) diff --git a/opm/models/discretization/common/fvbaseproperties.hh b/opm/models/discretization/common/fvbaseproperties.hh index c4aa6835c..bcd773a3c 100644 --- a/opm/models/discretization/common/fvbaseproperties.hh +++ b/opm/models/discretization/common/fvbaseproperties.hh @@ -36,7 +36,6 @@ namespace Opm::Properties { namespace TTag { struct FvBaseNewtonMethod; -struct VtkPrimaryVars; struct FiniteDifferenceLocalLinearizer; struct ParallelBiCGStabLinearSolver; } @@ -45,7 +44,7 @@ namespace TTag { //! The type tag for models based on the finite volume schemes struct FvBaseDiscretization -{ using InheritsFrom = std::tuple; }; +{ using InheritsFrom = std::tuple; }; } // namespace TTag diff --git a/opm/models/io/vtkprimaryvarsmodule.hh b/opm/models/io/vtkprimaryvarsmodule.hh index 1bc02d2d7..8cbd9aae5 100644 --- a/opm/models/io/vtkprimaryvarsmodule.hh +++ b/opm/models/io/vtkprimaryvarsmodule.hh @@ -35,36 +35,11 @@ #include #include -namespace Opm::Properties::TTag { - -// create new type tag for the VTK primary variables output -struct VtkPrimaryVars {}; - -} // namespace Opm::Properties::TTag - namespace Opm::Parameters { -// create the property tags needed for the primary variables module -template -struct VtkWritePrimaryVars { using type = Properties::UndefinedProperty; }; - -template -struct VtkWriteProcessRank { using type = Properties::UndefinedProperty; }; - -template -struct VtkWriteDofIndex { using type = Properties::UndefinedProperty; }; - -template -struct VtkWritePrimaryVars -{ static constexpr bool value = false; }; - -template -struct VtkWriteProcessRank -{ static constexpr bool value = false; }; - -template -struct VtkWriteDofIndex -{ static constexpr bool value = false; }; +struct VtkWritePrimaryVars { static constexpr bool value = false; }; +struct VtkWriteProcessRank { static constexpr bool value = false; }; +struct VtkWriteDofIndex { static constexpr bool value = false; }; } // namespace Opm::Properties @@ -102,11 +77,11 @@ public: */ static void registerParameters() { - Parameters::registerParam + Parameters::Register ("Include the primary variables into the VTK output files"); - Parameters::registerParam + Parameters::Register ("Include the MPI process rank into the VTK output files"); - Parameters::registerParam + Parameters::Register ("Include the index of the degrees of freedom into the VTK output files"); } @@ -178,17 +153,17 @@ public: private: static bool primaryVarsOutput_() { - static bool val = Parameters::get(); + static bool val = Parameters::Get(); return val; } static bool processRankOutput_() { - static bool val = Parameters::get(); + static bool val = Parameters::Get(); return val; } static bool dofIndexOutput_() { - static bool val = Parameters::get(); + static bool val = Parameters::Get(); return val; }