From fda381c3497a76ae08a4c5602395e9570bd48d2d Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Mon, 1 Jul 2024 10:20:05 +0200 Subject: [PATCH] changed: move the PrintProperties parameter to Opm::Parameters --- opm/models/utils/basicparameters.hh | 9 +++++++++ opm/models/utils/basicproperties.hh | 18 +++++------------- opm/models/utils/start.hh | 4 ++-- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/opm/models/utils/basicparameters.hh b/opm/models/utils/basicparameters.hh index 05683a4c1..020e322fd 100644 --- a/opm/models/utils/basicparameters.hh +++ b/opm/models/utils/basicparameters.hh @@ -42,6 +42,15 @@ struct GridGlobalRefinements { using type = Properties::UndefinedProperty; }; template struct ParameterFile { using type = Properties::UndefinedProperty; }; +/*! + * \brief Print all properties on startup? + * + * 0 means 'no', 1 means 'yes', 2 means 'print only to logfiles'. The + * default is 2. + */ +template +struct PrintProperties { using type = Properties::UndefinedProperty; }; + } // namespace Opm:Parameters #endif diff --git a/opm/models/utils/basicproperties.hh b/opm/models/utils/basicproperties.hh index be7bccf64..472d04543 100644 --- a/opm/models/utils/basicproperties.hh +++ b/opm/models/utils/basicproperties.hh @@ -105,15 +105,6 @@ template struct GridPart { using type = UndefinedProperty; }; #endif -/*! - * \brief Print all properties on startup? - * - * 0 means 'no', 1 means 'yes', 2 means 'print only to logfiles'. The - * default is 2. - */ -template -struct PrintProperties { using type = UndefinedProperty; }; - /*! * \brief Print all parameters on startup? * @@ -224,10 +215,6 @@ template struct GridView { using type = typename GetPropType::LeafGridView; }; #endif -//! By default, print the properties on startup -template -struct PrintProperties { static constexpr int value = 2; }; - //! By default, print the values of the run-time parameters on startup template struct PrintParameters { static constexpr int value = 2; }; @@ -278,6 +265,11 @@ template struct ParameterFile { static constexpr auto value = ""; }; +//! By default, print the properties on startup +template +struct PrintProperties +{ static constexpr int value = 2; }; + } #endif diff --git a/opm/models/utils/start.hh b/opm/models/utils/start.hh index 61ce45c9a..2a8f2861f 100644 --- a/opm/models/utils/start.hh +++ b/opm/models/utils/start.hh @@ -80,7 +80,7 @@ static inline void registerAllParameters_(bool finalizeRegistration = true) Parameters::registerParam ("An .ini file which contains a set of run-time parameters"); - Parameters::registerParam + Parameters::registerParam ("Print the values of the compile time properties at " "the start of the simulation"); Parameters::registerParam @@ -378,7 +378,7 @@ static inline int start(int argc, char **argv, bool registerParams=true) } // print the properties if requested - int printProps = Parameters::get(); + int printProps = Parameters::get(); if (printProps && myRank == 0) { if (printProps == 1 || !isatty(fileno(stdout))) Properties::printValues(std::cout);