mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-22 01:07:24 -06:00
Add strict parsing option to flow
This commit is contained in:
parent
eedbafb805
commit
71d4162a7e
@ -183,11 +183,14 @@ int main(int argc, char** argv)
|
||||
Opm::ParseContext parseContext;
|
||||
Opm::ErrorGuard errorGuard;
|
||||
|
||||
parseContext.update(Opm::ParseContext::PARSE_RANDOM_SLASH, Opm::InputError::IGNORE);
|
||||
parseContext.update(Opm::ParseContext::PARSE_MISSING_DIMS_KEYWORD, Opm::InputError::WARN);
|
||||
parseContext.update(Opm::ParseContext::SUMMARY_UNKNOWN_WELL, Opm::InputError::WARN);
|
||||
parseContext.update(Opm::ParseContext::SUMMARY_UNKNOWN_GROUP, Opm::InputError::WARN);
|
||||
|
||||
if (EWOMS_GET_PARAM(PreTypeTag, bool, EclStrictParsing))
|
||||
parseContext.update( Opm::InputError::DELAYED_EXIT1);
|
||||
else {
|
||||
parseContext.update(Opm::ParseContext::PARSE_RANDOM_SLASH, Opm::InputError::IGNORE);
|
||||
parseContext.update(Opm::ParseContext::PARSE_MISSING_DIMS_KEYWORD, Opm::InputError::WARN);
|
||||
parseContext.update(Opm::ParseContext::SUMMARY_UNKNOWN_WELL, Opm::InputError::WARN);
|
||||
parseContext.update(Opm::ParseContext::SUMMARY_UNKNOWN_GROUP, Opm::InputError::WARN);
|
||||
}
|
||||
|
||||
deck.reset( new Opm::Deck( parser.parseFile(deckFilename , parseContext, errorGuard)));
|
||||
if ( outputCout ) {
|
||||
|
@ -40,10 +40,12 @@ BEGIN_PROPERTIES
|
||||
NEW_PROP_TAG(EnableTerminalOutput);
|
||||
NEW_PROP_TAG(EnableAdaptiveTimeStepping);
|
||||
NEW_PROP_TAG(EnableTuning);
|
||||
NEW_PROP_TAG(EclStrictParsing);
|
||||
|
||||
SET_BOOL_PROP(EclFlowProblem, EnableTerminalOutput, true);
|
||||
SET_BOOL_PROP(EclFlowProblem, EnableAdaptiveTimeStepping, true);
|
||||
SET_BOOL_PROP(EclFlowProblem, EnableTuning, false);
|
||||
SET_BOOL_PROP(EclFlowProblem, EclStrictParsing, false);
|
||||
|
||||
END_PROPERTIES
|
||||
|
||||
@ -124,6 +126,8 @@ public:
|
||||
"Use adaptive time stepping between report steps");
|
||||
EWOMS_REGISTER_PARAM(TypeTag, bool, EnableTuning,
|
||||
"Honor some aspects of the TUNING keyword.");
|
||||
EWOMS_REGISTER_PARAM(TypeTag, bool, EclStrictParsing,
|
||||
"Handle input in strict mode - will terminate if any errors are found");
|
||||
}
|
||||
|
||||
/// Run the simulation.
|
||||
|
Loading…
Reference in New Issue
Block a user