mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-14 04:33:28 -06:00
OPM-251: Support for restart
This commit is contained in:
parent
0de2cff986
commit
d43f109770
@ -49,14 +49,16 @@ namespace Opm
|
||||
}
|
||||
|
||||
/// Use the SimulatorTimer as a shim around opm-parser's Opm::TimeMap
|
||||
void SimulatorTimer::init(Opm::TimeMapConstPtr timeMap)
|
||||
void SimulatorTimer::init(Opm::TimeMapConstPtr timeMap, bool restart, size_t report_step)
|
||||
{
|
||||
current_step_ = 0;
|
||||
total_time_ = timeMap->getTotalTime();
|
||||
timesteps_.resize(timeMap->numTimesteps());
|
||||
for ( size_t i = 0; i < timeMap->numTimesteps(); ++i ) {
|
||||
timesteps_[i] = timeMap->getTimeStepLength(i);
|
||||
}
|
||||
|
||||
setCurrentStepNum(report_step);
|
||||
|
||||
boost::posix_time::ptime start_time = timeMap->getStartTime(0);
|
||||
start_date_ = start_time.date();
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ namespace Opm
|
||||
void init(const parameter::ParameterGroup& param);
|
||||
|
||||
/// Use the SimulatorTimer as a shim around opm-parser's Opm::TimeMap
|
||||
void init(TimeMapConstPtr timeMap);
|
||||
void init(TimeMapConstPtr timeMap, bool restart = false, size_t report_step = 0);
|
||||
|
||||
/// Total number of steps.
|
||||
int numSteps() const;
|
||||
|
Loading…
Reference in New Issue
Block a user