mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-22 01:07:24 -06:00
move RestartTime to TypeTag-free parameter system
This commit is contained in:
parent
0e3d9604ab
commit
d95c049936
@ -77,8 +77,8 @@ struct PredeterminedTimeStepsFile { static constexpr auto value = ""; };
|
||||
struct PrintParameters { static constexpr int value = 2; };
|
||||
|
||||
//! The default value for the simulation's restart time
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct RestartTime { using type = Properties::UndefinedProperty; };
|
||||
template<class Scalar>
|
||||
struct RestartTime { static constexpr Scalar value = -1e35; };
|
||||
|
||||
} // namespace Opm:Parameters
|
||||
|
||||
|
@ -195,14 +195,6 @@ struct InitialTimeStepSize<TypeTag, Properties::TTag::NumericModel>
|
||||
static constexpr type value = -1e35;
|
||||
};
|
||||
|
||||
//! The default value for the simulation's restart time
|
||||
template<class TypeTag>
|
||||
struct RestartTime<TypeTag, Properties::TTag::NumericModel>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
||||
static constexpr type value = -1e35;
|
||||
};
|
||||
|
||||
} // namespace Opm::Parameters
|
||||
|
||||
#endif
|
||||
|
@ -258,7 +258,7 @@ public:
|
||||
("The simulation time at which the simulation is finished [s]");
|
||||
Parameters::registerParam<TypeTag, Parameters::InitialTimeStepSize>
|
||||
("The size of the initial time step [s]");
|
||||
Parameters::registerParam<TypeTag, Parameters::RestartTime>
|
||||
Parameters::Register<Parameters::RestartTime<Scalar>>
|
||||
("The simulation time at which a restart should be attempted [s]");
|
||||
Parameters::Register<Parameters::PredeterminedTimeStepsFile>
|
||||
("A file with a list of predetermined time step sizes (one "
|
||||
@ -649,7 +649,7 @@ public:
|
||||
TimerGuard writeTimerGuard(writeTimer_);
|
||||
|
||||
setupTimer_.start();
|
||||
Scalar restartTime = Parameters::get<TypeTag, Parameters::RestartTime>();
|
||||
Scalar restartTime = Parameters::Get<Parameters::RestartTime<Scalar>>();
|
||||
if (restartTime > -1e30) {
|
||||
// try to restart a previous simulation
|
||||
time_ = restartTime;
|
||||
|
Loading…
Reference in New Issue
Block a user