mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
move PredeterminedTimeStepsFile to TypeTag-free parameter system
This commit is contained in:
parent
db62f4d936
commit
6c7f40b786
@ -65,9 +65,8 @@ struct InitialTimeStepSize { using type = Properties::UndefinedProperty; };
|
|||||||
//! Set a value for the ParameterFile property
|
//! Set a value for the ParameterFile property
|
||||||
struct ParameterFile { static constexpr auto value = ""; };
|
struct ParameterFile { static constexpr auto value = ""; };
|
||||||
|
|
||||||
//! The name of the file with a number of forced time step lengths
|
//! By default, do not force any time steps
|
||||||
template<class TypeTag, class MyTypeTag>
|
struct PredeterminedTimeStepsFile { static constexpr auto value = ""; };
|
||||||
struct PredeterminedTimeStepsFile { using type = Properties::UndefinedProperty; };
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Print all parameters on startup?
|
* \brief Print all parameters on startup?
|
||||||
|
@ -195,11 +195,6 @@ struct InitialTimeStepSize<TypeTag, Properties::TTag::NumericModel>
|
|||||||
static constexpr type value = -1e35;
|
static constexpr type value = -1e35;
|
||||||
};
|
};
|
||||||
|
|
||||||
//! 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
|
//! By default, print the values of the run-time parameters on startup
|
||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
struct PrintParameters<TypeTag, Properties::TTag::NumericModel>
|
struct PrintParameters<TypeTag, Properties::TTag::NumericModel>
|
||||||
|
@ -133,7 +133,7 @@ public:
|
|||||||
timeStepSize_ = Parameters::get<TypeTag, Parameters::InitialTimeStepSize>();
|
timeStepSize_ = Parameters::get<TypeTag, Parameters::InitialTimeStepSize>();
|
||||||
assert(timeStepSize_ > 0);
|
assert(timeStepSize_ > 0);
|
||||||
const std::string& predetTimeStepFile =
|
const std::string& predetTimeStepFile =
|
||||||
Parameters::get<TypeTag, Parameters::PredeterminedTimeStepsFile>();
|
Parameters::Get<Parameters::PredeterminedTimeStepsFile>();
|
||||||
if (!predetTimeStepFile.empty()) {
|
if (!predetTimeStepFile.empty()) {
|
||||||
std::ifstream is(predetTimeStepFile);
|
std::ifstream is(predetTimeStepFile);
|
||||||
while (!is.eof()) {
|
while (!is.eof()) {
|
||||||
@ -260,7 +260,7 @@ public:
|
|||||||
("The size of the initial time step [s]");
|
("The size of the initial time step [s]");
|
||||||
Parameters::registerParam<TypeTag, Parameters::RestartTime>
|
Parameters::registerParam<TypeTag, Parameters::RestartTime>
|
||||||
("The simulation time at which a restart should be attempted [s]");
|
("The simulation time at which a restart should be attempted [s]");
|
||||||
Parameters::registerParam<TypeTag, Parameters::PredeterminedTimeStepsFile>
|
Parameters::Register<Parameters::PredeterminedTimeStepsFile>
|
||||||
("A file with a list of predetermined time step sizes (one "
|
("A file with a list of predetermined time step sizes (one "
|
||||||
"time step per line)");
|
"time step per line)");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user