mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-30 11:06:55 -06:00
Added ParseMode argument
This commit is contained in:
parent
0c2c079bd9
commit
71f3cc9c64
@ -57,6 +57,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>
|
||||
|
||||
@ -163,10 +164,11 @@ try
|
||||
|
||||
Opm::DeckConstPtr deck;
|
||||
std::shared_ptr<EclipseState> eclipseState;
|
||||
Opm::ParseMode parseMode;
|
||||
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;
|
||||
|
@ -48,6 +48,7 @@
|
||||
#include <opm/polymer/PolymerProperties.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
@ -99,8 +100,9 @@ try
|
||||
if (use_deck) {
|
||||
std::string deck_filename = param.get<std::string>("deck_filename");
|
||||
ParserPtr parser(new Opm::Parser());
|
||||
deck = parser->parseFile(deck_filename);
|
||||
eclipseState.reset(new Opm::EclipseState(deck));
|
||||
ParseMode parseMode;
|
||||
deck = parser->parseFile(deck_filename , parseMode);
|
||||
eclipseState.reset(new Opm::EclipseState(deck , parseMode));
|
||||
|
||||
// Grid init
|
||||
grid.reset(new GridManager(deck));
|
||||
|
@ -48,6 +48,7 @@
|
||||
#include <opm/polymer/PolymerProperties.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
@ -98,9 +99,10 @@ try
|
||||
double gravity[3] = { 0.0 };
|
||||
if (use_deck) {
|
||||
std::string deck_filename = param.get<std::string>("deck_filename");
|
||||
ParseMode parseMode;
|
||||
ParserPtr parser(new Opm::Parser());
|
||||
deck = parser->parseFile(deck_filename);
|
||||
eclipseState.reset(new Opm::EclipseState(deck));
|
||||
deck = parser->parseFile(deck_filename , parseMode);
|
||||
eclipseState.reset(new Opm::EclipseState(deck , parseMode));
|
||||
|
||||
// Grid init
|
||||
grid.reset(new GridManager(deck));
|
||||
|
@ -63,6 +63,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>
|
||||
|
||||
@ -137,6 +138,7 @@ try
|
||||
}
|
||||
|
||||
std::string logFile = output_dir + "/LOGFILE.txt";
|
||||
Opm::ParseMode parseMode;
|
||||
Opm::ParserPtr parser(new Opm::Parser());
|
||||
{
|
||||
std::shared_ptr<Opm::StreamLog> streamLog = std::make_shared<Opm::StreamLog>(logFile , Opm::Log::DefaultMessageTypes);
|
||||
@ -149,9 +151,9 @@ try
|
||||
Opm::DeckConstPtr deck;
|
||||
std::shared_ptr<EclipseState> eclipseState;
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user