Add commandline switch --sched-restart to control restart init

This commit is contained in:
Joakim Hove
2020-03-04 15:17:30 +01:00
parent 390c7b21d4
commit 42f96ca039
2 changed files with 7 additions and 1 deletions

View File

@@ -370,9 +370,11 @@ int main(int argc, char** argv)
restart file is not possible, but work is underways and it is
included here as a switch.
*/
const bool init_from_restart_file = false;
const bool init_from_restart_file = !EWOMS_GET_PARAM(PreTypeTag, bool, SchedRestart);
const auto& init_config = eclipseState->getInitConfig();
if (init_config.restartRequested() && init_from_restart_file) {
throw std::logic_error("Sorry - the ability to initialize wells and groups from the restart file is currently not ready");
int report_step = init_config.getRestartStep();
const auto& rst_filename = eclipseState->getIOConfig().getRestartFileName( init_config.getRestartRootName(), report_step, false );
Opm::EclIO::ERst rst_file(rst_filename);