mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-09-05 04:40:19 -05:00
Add ErrorGuard when parsing
This commit is contained in:
+5
-2
@@ -40,6 +40,8 @@
|
||||
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ErrorGuard.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/checkDeck.hpp>
|
||||
|
||||
@@ -178,8 +180,9 @@ int main(int argc, char** argv)
|
||||
tmp.push_back(ParseModePair(Opm::ParseContext::SUMMARY_UNKNOWN_WELL, Opm::InputError::WARN));
|
||||
tmp.push_back(ParseModePair(Opm::ParseContext::SUMMARY_UNKNOWN_GROUP, Opm::InputError::WARN));
|
||||
Opm::ParseContext parseContext(tmp);
|
||||
Opm::ErrorGuard errorGuard;
|
||||
|
||||
std::shared_ptr<Opm::Deck> deck = std::make_shared< Opm::Deck >( parser.parseFile(deckFilename , parseContext) );
|
||||
std::shared_ptr<Opm::Deck> deck = std::make_shared< Opm::Deck >( parser.parseFile(deckFilename , parseContext, errorGuard) );
|
||||
if ( outputCout ) {
|
||||
Opm::checkDeck(*deck, parser);
|
||||
Opm::MissingFeatures::checkKeywords(*deck);
|
||||
@@ -187,7 +190,7 @@ int main(int argc, char** argv)
|
||||
Opm::Runspec runspec( *deck );
|
||||
const auto& phases = runspec.phases();
|
||||
|
||||
std::shared_ptr<Opm::EclipseState> eclipseState = std::make_shared< Opm::EclipseState > ( *deck, parseContext );
|
||||
std::shared_ptr<Opm::EclipseState> eclipseState = std::make_shared< Opm::EclipseState > ( *deck, parseContext, errorGuard );
|
||||
|
||||
// run the actual simulator
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user