Merge pull request #937 from chflo/OPM_251_support_restart

OPM-251: Prepare for restart
This commit is contained in:
dr-robertk committed 2016-01-15 14:44:06 -07:00
commit b26eb3827f
8 files changed
+231 -107

No files matched your search

+4 -2
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();
}
+1 -1
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;