diff --git a/ebos/eclbasevanguard.hh b/ebos/eclbasevanguard.hh index d02d46d44..dbd16e223 100644 --- a/ebos/eclbasevanguard.hh +++ b/ebos/eclbasevanguard.hh @@ -73,6 +73,7 @@ NEW_PROP_TAG(EclDeckFileName); NEW_PROP_TAG(OutputDir); NEW_PROP_TAG(EnableOpmRstFile); NEW_PROP_TAG(EclStrictParsing); +NEW_PROP_TAG(SchedRestart); NEW_PROP_TAG(EclOutputInterval); NEW_PROP_TAG(IgnoreKeywords); NEW_PROP_TAG(EnableExperiments); @@ -83,6 +84,7 @@ SET_STRING_PROP(EclBaseVanguard, EclDeckFileName, ""); SET_INT_PROP(EclBaseVanguard, EclOutputInterval, -1); // use the deck-provided value SET_BOOL_PROP(EclBaseVanguard, EnableOpmRstFile, false); SET_BOOL_PROP(EclBaseVanguard, EclStrictParsing, false); +SET_BOOL_PROP(EclBaseVanguard, SchedRestart, true); SET_INT_PROP(EclBaseVanguard, EdgeWeightsMethod, 1); END_PROPERTIES @@ -127,6 +129,8 @@ public: "List of Eclipse keywords which should be ignored. As a ':' separated string."); EWOMS_REGISTER_PARAM(TypeTag, bool, EclStrictParsing, "Use strict mode for parsing - all errors are collected before the applicaton exists."); + EWOMS_REGISTER_PARAM(TypeTag, bool, SchedRestart, + "When restarting: should we try to initialize wells and groups from historical SCHEDULE section."); EWOMS_REGISTER_PARAM(TypeTag, int, EdgeWeightsMethod, "Choose edge-weighing strategy: 0=uniform, 1=trans, 2=log(trans)."); } diff --git a/flow/flow.cpp b/flow/flow.cpp index 43c6a9fd7..2685f3fd5 100644 --- a/flow/flow.cpp +++ b/flow/flow.cpp @@ -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);