mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Update legacy sim to also read time step from restart.
This commit is contained in:
parent
ffaa48295a
commit
378addd000
@ -89,10 +89,10 @@ namespace Opm
|
|||||||
{
|
{
|
||||||
WellState prev_well_state;
|
WellState prev_well_state;
|
||||||
|
|
||||||
|
ExtraData extra;
|
||||||
if (output_writer_.isRestart()) {
|
if (output_writer_.isRestart()) {
|
||||||
// This is a restart, populate WellState and ReservoirState state objects from restart file
|
// 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_);
|
initHydroCarbonState(state, props_.phaseUsage(), Opm::UgGridHelpers::numCells(grid_), has_disgas_, has_vapoil_);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,6 +117,9 @@ namespace Opm
|
|||||||
} else {
|
} else {
|
||||||
adaptiveTimeStepping.reset( new AdaptiveTimeStepping( param_, terminal_output_ ) );
|
adaptiveTimeStepping.reset( new AdaptiveTimeStepping( param_, terminal_output_ ) );
|
||||||
}
|
}
|
||||||
|
if (output_writer_.isRestart()) {
|
||||||
|
adaptiveTimeStepping->setSuggestedNextStep(extra.suggested_step);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string restorefilename = param_.getDefault("restorefile", std::string("") );
|
std::string restorefilename = param_.getDefault("restorefile", std::string("") );
|
||||||
|
@ -198,6 +198,7 @@ namespace Opm
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/// Extra data to read/write for OPM restarting
|
||||||
struct ExtraData
|
struct ExtraData
|
||||||
{
|
{
|
||||||
double suggested_step;
|
double suggested_step;
|
||||||
|
Loading…
Reference in New Issue
Block a user