From 0a5be9ba52218913bfbbbf4000d82c8a7273b6cd Mon Sep 17 00:00:00 2001 From: Liu Ming Date: Thu, 17 Mar 2016 09:46:12 +0800 Subject: [PATCH] rename ParseMode in examples folder. --- examples/compute_initial_state.cpp | 8 ++++---- examples/compute_tof.cpp | 8 ++++---- examples/diagnose_relperm.cpp | 20 ++++++++++---------- examples/mirror_grid.cpp | 6 +++--- examples/sim_2p_comp_reorder.cpp | 8 ++++---- examples/sim_2p_incomp.cpp | 8 ++++---- 6 files changed, 29 insertions(+), 29 deletions(-) diff --git a/examples/compute_initial_state.cpp b/examples/compute_initial_state.cpp index a8e3704d..adf85ab5 100644 --- a/examples/compute_initial_state.cpp +++ b/examples/compute_initial_state.cpp @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include @@ -85,10 +85,10 @@ try parameter::ParameterGroup param(argc, argv); std::cout << "--------------- Reading parameters ---------------" << std::endl; const std::string deck_filename = param.get("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(); diff --git a/examples/compute_tof.cpp b/examples/compute_tof.cpp index a9ca0992..06ec0418 100644 --- a/examples/compute_tof.cpp +++ b/examples/compute_tof.cpp @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include @@ -172,9 +172,9 @@ try // Read the deck. std::string deck_filename = param.get("deck_filename"); Parser parser; - ParseMode parseMode; - DeckConstPtr deck = parser.parseFile(deck_filename , parseMode); - EclipseStateConstPtr eclipseState = std::make_shared(deck , parseMode); + ParseContext parseContext; + DeckConstPtr deck = parser.parseFile(deck_filename , parseContext); + EclipseStateConstPtr eclipseState = std::make_shared(deck , parseContext); // Grid init GridManager grid_manager(deck); diff --git a/examples/diagnose_relperm.cpp b/examples/diagnose_relperm.cpp index 7b5fb03c..1c7775e9 100644 --- a/examples/diagnose_relperm.cpp +++ b/examples/diagnose_relperm.cpp @@ -32,7 +32,7 @@ #include #include -#include +#include #include #include @@ -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(); diff --git a/examples/mirror_grid.cpp b/examples/mirror_grid.cpp index 424d7fc0..34d29455 100644 --- a/examples/mirror_grid.cpp +++ b/examples/mirror_grid.cpp @@ -21,7 +21,7 @@ #include "config.h" #include -#include +#include #include #include #include @@ -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); diff --git a/examples/sim_2p_comp_reorder.cpp b/examples/sim_2p_comp_reorder.cpp index f72f4666..6be03849 100644 --- a/examples/sim_2p_comp_reorder.cpp +++ b/examples/sim_2p_comp_reorder.cpp @@ -45,7 +45,7 @@ #include #include -#include +#include #include @@ -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("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)); diff --git a/examples/sim_2p_incomp.cpp b/examples/sim_2p_incomp.cpp index ec88f2e8..f481ec59 100644 --- a/examples/sim_2p_incomp.cpp +++ b/examples/sim_2p_incomp.cpp @@ -45,7 +45,7 @@ #include #include -#include +#include #include #include @@ -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("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