rename ParseMode in examples folder.
This commit is contained in:
parent
d943cbfe2a
commit
0a5be9ba52
@ -30,7 +30,7 @@
|
||||
#include <opm/core/props/BlackoilPropertiesFromDeck.hpp>
|
||||
#include <opm/core/simulator/BlackoilState.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
|
||||
@ -85,10 +85,10 @@ try
|
||||
parameter::ParameterGroup param(argc, argv);
|
||||
std::cout << "--------------- Reading parameters ---------------" << std::endl;
|
||||
const std::string deck_filename = param.get<std::string>("deck_filename");
|
||||
Opm::ParseMode parseMode;
|
||||
Opm::ParseContext parseContext;
|
||||
Opm::ParserPtr parser(new Opm::Parser() );
|
||||
Opm::DeckConstPtr deck = parser->parseFile(deck_filename , parseMode);
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck, parseMode));
|
||||
Opm::DeckConstPtr deck = parser->parseFile(deck_filename , parseContext);
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck, parseContext));
|
||||
const double grav = param.getDefault("gravity", unit::gravity);
|
||||
GridManager gm(deck);
|
||||
const UnstructuredGrid& grid = *gm.c_grid();
|
||||
|
@ -44,7 +44,7 @@
|
||||
#include <opm/core/flowdiagnostics/TofDiscGalReorder.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||
|
||||
#include <memory>
|
||||
@ -172,9 +172,9 @@ try
|
||||
// Read the deck.
|
||||
std::string deck_filename = param.get<std::string>("deck_filename");
|
||||
Parser parser;
|
||||
ParseMode parseMode;
|
||||
DeckConstPtr deck = parser.parseFile(deck_filename , parseMode);
|
||||
EclipseStateConstPtr eclipseState = std::make_shared<EclipseState>(deck , parseMode);
|
||||
ParseContext parseContext;
|
||||
DeckConstPtr deck = parser.parseFile(deck_filename , parseContext);
|
||||
EclipseStateConstPtr eclipseState = std::make_shared<EclipseState>(deck , parseContext);
|
||||
|
||||
// Grid init
|
||||
GridManager grid_manager(deck);
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include <opm/core/utility/miscUtilities.hpp>
|
||||
#include <opm/core/utility/parameters/ParameterGroup.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
|
||||
@ -65,16 +65,16 @@ try
|
||||
const char* eclipseFilename = argv[1];
|
||||
EclipseStateConstPtr eclState;
|
||||
ParserPtr parser(new Opm::Parser);
|
||||
Opm::ParseMode parseMode({{ ParseMode::PARSE_RANDOM_SLASH , InputError::IGNORE },
|
||||
{ ParseMode::PARSE_UNKNOWN_KEYWORD, InputError::IGNORE},
|
||||
{ ParseMode::PARSE_RANDOM_TEXT, InputError::IGNORE},
|
||||
{ ParseMode::UNSUPPORTED_SCHEDULE_GEO_MODIFIER, InputError::IGNORE},
|
||||
{ ParseMode::UNSUPPORTED_COMPORD_TYPE, InputError::IGNORE},
|
||||
{ ParseMode::UNSUPPORTED_INITIAL_THPRES, InputError::IGNORE},
|
||||
{ ParseMode::INTERNAL_ERROR_UNINITIALIZED_THPRES, InputError::IGNORE}
|
||||
Opm::ParseContext parseContext({{ ParseContext::PARSE_RANDOM_SLASH , InputError::IGNORE },
|
||||
{ ParseContext::PARSE_UNKNOWN_KEYWORD, InputError::IGNORE},
|
||||
{ ParseContext::PARSE_RANDOM_TEXT, InputError::IGNORE},
|
||||
{ ParseContext::UNSUPPORTED_SCHEDULE_GEO_MODIFIER, InputError::IGNORE},
|
||||
{ ParseContext::UNSUPPORTED_COMPORD_TYPE, InputError::IGNORE},
|
||||
{ ParseContext::UNSUPPORTED_INITIAL_THPRES, InputError::IGNORE},
|
||||
{ ParseContext::INTERNAL_ERROR_UNINITIALIZED_THPRES, InputError::IGNORE}
|
||||
});
|
||||
Opm::DeckConstPtr deck(parser->parseFile(eclipseFilename, parseMode));
|
||||
eclState.reset(new EclipseState(deck, parseMode));
|
||||
Opm::DeckConstPtr deck(parser->parseFile(eclipseFilename, parseContext));
|
||||
eclState.reset(new EclipseState(deck, parseContext));
|
||||
|
||||
GridManager gm(deck);
|
||||
const UnstructuredGrid& grid = *gm.c_grid();
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "config.h"
|
||||
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckItem.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
||||
@ -366,8 +366,8 @@ int main(int argc, char** argv)
|
||||
// Parse grdecl file
|
||||
std::cout << "Parsing grid file '" << eclipsefilename << "' ..." << std::endl;
|
||||
Opm::ParserPtr parser(new Opm::Parser);
|
||||
Opm::ParseMode parseMode;
|
||||
Opm::DeckConstPtr deck(parser->parseFile(eclipsefilename , parseMode));
|
||||
Opm::ParseContext parseContext;
|
||||
Opm::DeckConstPtr deck(parser->parseFile(eclipsefilename , parseContext));
|
||||
if ( ! (deck->hasKeyword("SPECGRID") && deck->hasKeyword("COORD") && deck->hasKeyword("ZCORN")) ) {
|
||||
std::cerr << "Grid file " << eclipsefilename << "are missing keywords SPECGRID, COORD or ZCORN!" << std::endl;
|
||||
exit(1);
|
||||
|
@ -45,7 +45,7 @@
|
||||
#include <opm/core/simulator/SimulatorCompressibleTwophase.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
|
||||
|
||||
@ -98,10 +98,10 @@ try
|
||||
// int max_well_control_iterations = 0;
|
||||
double gravity[3] = { 0.0 };
|
||||
if (use_deck) {
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
std::string deck_filename = param.get<std::string>("deck_filename");
|
||||
deck = parser->parseFile(deck_filename , parseMode);
|
||||
eclipseState.reset(new EclipseState(deck, parseMode));
|
||||
deck = parser->parseFile(deck_filename , parseContext);
|
||||
eclipseState.reset(new EclipseState(deck, parseContext));
|
||||
|
||||
// Grid init
|
||||
grid.reset(new GridManager(deck));
|
||||
|
@ -45,7 +45,7 @@
|
||||
#include <opm/core/simulator/WellState.hpp>
|
||||
#include <opm/core/simulator/SimulatorIncompTwophase.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
|
||||
@ -111,11 +111,11 @@ try
|
||||
double gravity[3] = { 0.0 };
|
||||
if (use_deck) {
|
||||
ParserPtr parser(new Opm::Parser());
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
|
||||
std::string deck_filename = param.get<std::string>("deck_filename");
|
||||
deck = parser->parseFile(deck_filename , parseMode);
|
||||
eclipseState.reset( new EclipseState(deck, parseMode));
|
||||
deck = parser->parseFile(deck_filename , parseContext);
|
||||
eclipseState.reset( new EclipseState(deck, parseContext));
|
||||
// Grid init
|
||||
grid.reset(new GridManager(deck));
|
||||
// Rock and fluid init
|
||||
|
Loading…
Reference in New Issue
Block a user