Update schedule object after it is actually created..

This commit is contained in:
Vegard Kippe 2024-02-21 21:47:51 +01:00
parent cd1b0f808b
commit b14df39503

View File

@ -557,12 +557,16 @@ void Opm::readDeck(Opm::Parallel::Communication comm,
auto parseContext = setupParseContext(exitOnAllErrors); auto parseContext = setupParseContext(exitOnAllErrors);
if (treatCriticalAsNonCritical) { // Continue with invalid names if parsing strictness is set to low if (treatCriticalAsNonCritical) { // Continue with invalid names if parsing strictness is set to low
parseContext->update(ParseContext::SCHEDULE_INVALID_NAME, InputErrorAction::WARN); parseContext->update(ParseContext::SCHEDULE_INVALID_NAME, InputErrorAction::WARN);
schedule->treat_critical_as_non_critical(true);
} }
readOnIORank(comm, deckFilename, parseContext.get(), readOnIORank(comm, deckFilename, parseContext.get(),
eclipseState, schedule, udqState, actionState, wtestState, eclipseState, schedule, udqState, actionState, wtestState,
summaryConfig, std::move(python), initFromRestart, summaryConfig, std::move(python), initFromRestart,
checkDeck, treatCriticalAsNonCritical, outputInterval, *errorGuard); checkDeck, treatCriticalAsNonCritical, outputInterval, *errorGuard);
if (treatCriticalAsNonCritical) { // Update schedule so that re-parsing after actions use same strictness
assert(schedule);
schedule->treat_critical_as_non_critical(true);
}
} }
catch (const OpmInputError& input_error) { catch (const OpmInputError& input_error) {
failureMessage = input_error.what(); failureMessage = input_error.what();