changed: move the PredeterminedTimeStepsFile parameter to Opm::Parameters

This commit is contained in:
Arne Morten Kvarving 2024-07-01 10:20:05 +02:00
parent 48d2672402
commit 6b11559bf4
3 changed files with 11 additions and 10 deletions

View File

@ -50,6 +50,10 @@ struct InitialTimeStepSize { using type = Properties::UndefinedProperty; };
template<class TypeTag, class MyTypeTag>
struct ParameterFile { using type = Properties::UndefinedProperty; };
//! The name of the file with a number of forced time step lengths
template<class TypeTag, class MyTypeTag>
struct PredeterminedTimeStepsFile { using type = Properties::UndefinedProperty; };
/*!
* \brief Print all parameters on startup?
*

View File

@ -105,10 +105,6 @@ template<class TypeTag, class MyTypeTag>
struct GridPart { using type = UndefinedProperty; };
#endif
//! The name of the file with a number of forced time step lengths
template<class TypeTag, class MyTypeTag>
struct PredeterminedTimeStepsFile { using type = UndefinedProperty; };
//! domain size
template<class TypeTag, class MyTypeTag>
struct DomainSizeX { using type = UndefinedProperty; };
@ -194,10 +190,6 @@ template<class TypeTag>
struct GridView<TypeTag, TTag::NumericModel> { using type = typename GetPropType<TypeTag, Properties::Grid>::LeafGridView; };
#endif
//! By default, do not force any time steps
template<class TypeTag>
struct PredeterminedTimeStepsFile<TypeTag, TTag::NumericModel> { static constexpr auto value = ""; };
template<class TypeTag>
struct Vanguard<TypeTag, TTag::NumericModel> { using type = Opm::DgfVanguard<TypeTag>; };
@ -232,6 +224,11 @@ template<class TypeTag>
struct ParameterFile<TypeTag, Properties::TTag::NumericModel>
{ static constexpr auto value = ""; };
//! By default, do not force any time steps
template<class TypeTag>
struct PredeterminedTimeStepsFile<TypeTag, Properties::TTag::NumericModel>
{ static constexpr auto value = ""; };
//! By default, print the values of the run-time parameters on startup
template<class TypeTag>
struct PrintParameters<TypeTag, Properties::TTag::NumericModel>

View File

@ -133,7 +133,7 @@ public:
timeStepSize_ = Parameters::get<TypeTag, Parameters::InitialTimeStepSize>();
assert(timeStepSize_ > 0);
const std::string& predetTimeStepFile =
Parameters::get<TypeTag, Properties::PredeterminedTimeStepsFile>();
Parameters::get<TypeTag, Parameters::PredeterminedTimeStepsFile>();
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<TypeTag, Parameters::RestartTime>
("The simulation time at which a restart should be attempted [s]");
Parameters::registerParam<TypeTag, Properties::PredeterminedTimeStepsFile>
Parameters::registerParam<TypeTag, Parameters::PredeterminedTimeStepsFile>
("A file with a list of predetermined time step sizes (one "
"time step per line)");