diff --git a/opm/autodiff/SimulatorBase_impl.hpp b/opm/autodiff/SimulatorBase_impl.hpp index d3eb3e994..a82c403cd 100644 --- a/opm/autodiff/SimulatorBase_impl.hpp +++ b/opm/autodiff/SimulatorBase_impl.hpp @@ -89,10 +89,10 @@ namespace Opm { WellState prev_well_state; - + ExtraData extra; if (output_writer_.isRestart()) { // This is a restart, populate WellState and ReservoirState state objects from restart file - output_writer_.initFromRestartFile(props_.phaseUsage(), grid_, state, prev_well_state); + output_writer_.initFromRestartFile(props_.phaseUsage(), grid_, state, prev_well_state, extra); initHydroCarbonState(state, props_.phaseUsage(), Opm::UgGridHelpers::numCells(grid_), has_disgas_, has_vapoil_); } @@ -117,6 +117,9 @@ namespace Opm } else { adaptiveTimeStepping.reset( new AdaptiveTimeStepping( param_, terminal_output_ ) ); } + if (output_writer_.isRestart()) { + adaptiveTimeStepping->setSuggestedNextStep(extra.suggested_step); + } } std::string restorefilename = param_.getDefault("restorefile", std::string("") ); diff --git a/opm/autodiff/SimulatorFullyImplicitBlackoilOutput.hpp b/opm/autodiff/SimulatorFullyImplicitBlackoilOutput.hpp index a59b3e737..ad6e070d1 100644 --- a/opm/autodiff/SimulatorFullyImplicitBlackoilOutput.hpp +++ b/opm/autodiff/SimulatorFullyImplicitBlackoilOutput.hpp @@ -198,6 +198,7 @@ namespace Opm }; + /// Extra data to read/write for OPM restarting struct ExtraData { double suggested_step;