From 6c7f40b7860ce022f7e6e4dfbc3767f0109ccec6 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Fri, 5 Jul 2024 17:49:51 +0200 Subject: [PATCH] move PredeterminedTimeStepsFile to TypeTag-free parameter system --- opm/models/utils/basicparameters.hh | 5 ++--- opm/models/utils/basicproperties.hh | 5 ----- opm/models/utils/simulator.hh | 4 ++-- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/opm/models/utils/basicparameters.hh b/opm/models/utils/basicparameters.hh index 0e8be2bb3..348a5d795 100644 --- a/opm/models/utils/basicparameters.hh +++ b/opm/models/utils/basicparameters.hh @@ -65,9 +65,8 @@ struct InitialTimeStepSize { using type = Properties::UndefinedProperty; }; //! Set a value for the ParameterFile property struct ParameterFile { static constexpr auto value = ""; }; -//! The name of the file with a number of forced time step lengths -template -struct PredeterminedTimeStepsFile { using type = Properties::UndefinedProperty; }; +//! By default, do not force any time steps +struct PredeterminedTimeStepsFile { static constexpr auto value = ""; }; /*! * \brief Print all parameters on startup? diff --git a/opm/models/utils/basicproperties.hh b/opm/models/utils/basicproperties.hh index cc3e7962c..9a9370a74 100644 --- a/opm/models/utils/basicproperties.hh +++ b/opm/models/utils/basicproperties.hh @@ -195,11 +195,6 @@ struct InitialTimeStepSize static constexpr type value = -1e35; }; -//! By default, do not force any time steps -template -struct PredeterminedTimeStepsFile -{ static constexpr auto value = ""; }; - //! By default, print the values of the run-time parameters on startup template struct PrintParameters diff --git a/opm/models/utils/simulator.hh b/opm/models/utils/simulator.hh index 65bd2198e..c80f85aba 100644 --- a/opm/models/utils/simulator.hh +++ b/opm/models/utils/simulator.hh @@ -133,7 +133,7 @@ public: timeStepSize_ = Parameters::get(); assert(timeStepSize_ > 0); const std::string& predetTimeStepFile = - Parameters::get(); + Parameters::Get(); if (!predetTimeStepFile.empty()) { std::ifstream is(predetTimeStepFile); while (!is.eof()) { @@ -260,7 +260,7 @@ public: ("The size of the initial time step [s]"); Parameters::registerParam ("The simulation time at which a restart should be attempted [s]"); - Parameters::registerParam + Parameters::Register ("A file with a list of predetermined time step sizes (one " "time step per line)");