OPM-251: Support for restart

This commit is contained in:
chflo 2015-12-10 14:47:33 +01:00
parent 0de2cff986
commit d43f109770
2 changed files with 5 additions and 3 deletions

View File

@ -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();
}

View File

@ -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;