Add parsermode to EclipseState

This commit is contained in:
Tor Harald Sandve 2015-08-10 09:27:47 +02:00
parent 17cddaf126
commit a5f625f541

View File

@ -87,6 +87,7 @@
#include <opm/parser/eclipse/OpmLog/CounterLog.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
#include <opm/parser/eclipse/EclipseState/checkDeck.hpp>
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
@ -213,12 +214,14 @@ try
Opm::OpmLog::addBackend( "COUNTER" , counterLog );
}
Opm::ParseMode parseMode;
Opm::DeckConstPtr deck;
std::shared_ptr<EclipseState> eclipseState;
parseMode.randomSlash = InputError::IGNORE;
try {
deck = parser->parseFile(deck_filename);
deck = parser->parseFile(deck_filename, parseMode);
Opm::checkDeck(deck);
eclipseState.reset(new Opm::EclipseState(deck));
eclipseState.reset(new Opm::EclipseState(deck , parseMode));
}
catch (const std::invalid_argument& e) {
std::cerr << "Failed to create valid ECLIPSESTATE object. See logfile: " << logFile << std::endl;