mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Add commandline switch --sched-restart to control restart init
This commit is contained in:
parent
390c7b21d4
commit
42f96ca039
@ -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).");
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user