mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-26 03:00:17 -06:00
rename ParseMode as ParseContext.
This commit is contained in:
parent
debf039175
commit
17e5eb2dee
@ -31,7 +31,7 @@
|
||||
#include <ert/ecl/ecl_nnc_export.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/EclipseState/EclipseState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/TransMult.hpp>
|
||||
@ -345,10 +345,10 @@ int main(int argc, char** argv) {
|
||||
|
||||
ParserPtr parser(new Parser());
|
||||
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
std::cout << "Parsing input file ............: " << input_file << std::endl;
|
||||
DeckConstPtr deck = parser->parseFile(input_file, parseMode);
|
||||
std::shared_ptr<EclipseState> state = std::make_shared<EclipseState>( deck , parseMode );
|
||||
DeckConstPtr deck = parser->parseFile(input_file, parseContext);
|
||||
std::shared_ptr<EclipseState> state = std::make_shared<EclipseState>( deck , parseContext );
|
||||
|
||||
std::cout << "Loading eclipse INIT file .....: " << init_file << std::endl;
|
||||
ecl_file_type * ecl_init = ecl_file_open( init_file.c_str() , 0 );
|
||||
|
@ -47,7 +47,7 @@
|
||||
#include <opm/autodiff/SimulatorIncompTwophaseAd.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>
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
@ -112,9 +112,9 @@ try
|
||||
double gravity[3] = { 0.0 };
|
||||
if (use_deck) {
|
||||
std::string deck_filename = param.get<std::string>("deck_filename");
|
||||
Opm::ParseMode parseMode;
|
||||
deck = parser->parseFile(deck_filename, parseMode);
|
||||
eclipseState.reset(new EclipseState(deck , parseMode));
|
||||
Opm::ParseContext parseContext;
|
||||
deck = parser->parseFile(deck_filename, parseContext);
|
||||
eclipseState.reset(new EclipseState(deck , parseContext));
|
||||
|
||||
// Grid init
|
||||
grid.reset(new GridManager(deck));
|
||||
|
@ -48,7 +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/Parser/ParseContext.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
@ -100,9 +100,9 @@ try
|
||||
if (use_deck) {
|
||||
std::string deck_filename = param.get<std::string>("deck_filename");
|
||||
ParserPtr parser(new Opm::Parser());
|
||||
Opm::ParseMode parseMode({{ ParseMode::PARSE_RANDOM_SLASH , InputError::IGNORE }});
|
||||
deck = parser->parseFile(deck_filename , parseMode);
|
||||
eclipseState.reset(new Opm::EclipseState(deck , parseMode));
|
||||
Opm::ParseContext parseContext({{ ParseContext::PARSE_RANDOM_SLASH , InputError::IGNORE }});
|
||||
deck = parser->parseFile(deck_filename , parseContext);
|
||||
eclipseState.reset(new Opm::EclipseState(deck , parseContext));
|
||||
|
||||
// Grid init
|
||||
grid.reset(new GridManager(deck));
|
||||
|
@ -48,7 +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/Parser/ParseContext.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
@ -99,10 +99,10 @@ try
|
||||
double gravity[3] = { 0.0 };
|
||||
if (use_deck) {
|
||||
std::string deck_filename = param.get<std::string>("deck_filename");
|
||||
Opm::ParseMode parseMode({{ ParseMode::PARSE_RANDOM_SLASH , InputError::IGNORE }});
|
||||
Opm::ParseContext parseContext({{ ParseContext::PARSE_RANDOM_SLASH , InputError::IGNORE }});
|
||||
ParserPtr parser(new Opm::Parser());
|
||||
deck = parser->parseFile(deck_filename , parseMode);
|
||||
eclipseState.reset(new Opm::EclipseState(deck , parseMode));
|
||||
deck = parser->parseFile(deck_filename , parseContext);
|
||||
eclipseState.reset(new Opm::EclipseState(deck , parseContext));
|
||||
|
||||
// Grid init
|
||||
grid.reset(new GridManager(deck));
|
||||
|
@ -66,7 +66,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/Parser/ParseContext.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/checkDeck.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
|
||||
@ -141,7 +141,7 @@ try
|
||||
}
|
||||
|
||||
std::string logFile = output_dir + "/LOGFILE.txt";
|
||||
Opm::ParseMode parseMode({{ ParseMode::PARSE_RANDOM_SLASH , InputError::IGNORE }});
|
||||
Opm::ParseContext parseContext({{ ParseContext::PARSE_RANDOM_SLASH , InputError::IGNORE }});
|
||||
Opm::ParserPtr parser(new Opm::Parser());
|
||||
{
|
||||
std::shared_ptr<Opm::StreamLog> streamLog = std::make_shared<Opm::StreamLog>(logFile , Opm::Log::DefaultMessageTypes);
|
||||
@ -154,9 +154,9 @@ try
|
||||
Opm::DeckConstPtr deck;
|
||||
std::shared_ptr<EclipseState> eclipseState;
|
||||
try {
|
||||
deck = parser->parseFile(deck_filename , parseMode);
|
||||
deck = parser->parseFile(deck_filename , parseContext);
|
||||
Opm::checkDeck(deck, parser);
|
||||
eclipseState.reset(new Opm::EclipseState(deck , parseMode));
|
||||
eclipseState.reset(new Opm::EclipseState(deck , parseContext));
|
||||
}
|
||||
catch (const std::invalid_argument& e) {
|
||||
std::cerr << "Failed to create valid ECLIPSESTATE object. See logfile: " << logFile << std::endl;
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include <opm/core/utility/parameters/ParameterGroup.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>
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
|
||||
@ -48,10 +48,10 @@
|
||||
struct SetupSimple {
|
||||
SetupSimple()
|
||||
{
|
||||
Opm::ParseMode parseMode;
|
||||
Opm::ParseContext parseContext;
|
||||
Opm::ParserPtr parser(new Opm::Parser());
|
||||
deck = parser->parseFile("fluid.data", parseMode);
|
||||
eclState.reset(new Opm::EclipseState(deck , parseMode));
|
||||
deck = parser->parseFile("fluid.data", parseContext);
|
||||
eclState.reset(new Opm::EclipseState(deck , parseContext));
|
||||
|
||||
param.disableOutput();
|
||||
param.insertParameter("init_rock" , "false" );
|
||||
|
@ -39,7 +39,7 @@
|
||||
#include <opm/core/simulator/BlackoilState.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>
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
|
||||
@ -48,9 +48,9 @@ struct SetupSimple {
|
||||
SetupSimple()
|
||||
{
|
||||
Opm::ParserPtr parser(new Opm::Parser());
|
||||
Opm::ParseMode parseMode;
|
||||
deck = parser->parseFile("fluid.data" , parseMode);
|
||||
eclState.reset(new Opm::EclipseState(deck , parseMode));
|
||||
Opm::ParseContext parseContext;
|
||||
deck = parser->parseFile("fluid.data" , parseContext);
|
||||
eclState.reset(new Opm::EclipseState(deck , parseContext));
|
||||
|
||||
param.disableOutput();
|
||||
param.insertParameter("init_rock" , "false" );
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <opm/core/utility/parameters/ParameterGroup.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/Deck/Deck.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
|
||||
@ -158,12 +158,12 @@ BOOST_AUTO_TEST_CASE(TransmissibilityMultipliersLegacyGridInterface)
|
||||
{
|
||||
Opm::parameter::ParameterGroup param;
|
||||
Opm::ParserPtr parser(new Opm::Parser() );
|
||||
Opm::ParseMode parseMode;
|
||||
Opm::ParseContext parseContext;
|
||||
|
||||
/////
|
||||
// create a DerivedGeology object without any multipliers involved
|
||||
Opm::DeckConstPtr origDeck = parser->parseString(origDeckString, parseMode);
|
||||
Opm::EclipseStateConstPtr origEclipseState(new Opm::EclipseState(origDeck , parseMode));
|
||||
Opm::DeckConstPtr origDeck = parser->parseString(origDeckString, parseContext);
|
||||
Opm::EclipseStateConstPtr origEclipseState(new Opm::EclipseState(origDeck , parseContext));
|
||||
|
||||
auto origGridManager = std::make_shared<Opm::GridManager>(origEclipseState->getEclipseGrid());
|
||||
auto origProps = std::make_shared<Opm::BlackoilPropsAdFromDeck>(origDeck, origEclipseState, *(origGridManager->c_grid()));
|
||||
@ -173,8 +173,8 @@ BOOST_AUTO_TEST_CASE(TransmissibilityMultipliersLegacyGridInterface)
|
||||
|
||||
/////
|
||||
// create a DerivedGeology object _with_ transmissibility multipliers involved
|
||||
Opm::DeckConstPtr multDeck = parser->parseString(multDeckString, parseMode);
|
||||
Opm::EclipseStateConstPtr multEclipseState(new Opm::EclipseState(multDeck, parseMode));
|
||||
Opm::DeckConstPtr multDeck = parser->parseString(multDeckString, parseContext);
|
||||
Opm::EclipseStateConstPtr multEclipseState(new Opm::EclipseState(multDeck, parseContext));
|
||||
|
||||
auto multGridManager = std::make_shared<Opm::GridManager>(multEclipseState->getEclipseGrid());
|
||||
auto multProps = std::make_shared<Opm::BlackoilPropsAdFromDeck>(multDeck, multEclipseState, *(multGridManager->c_grid()));
|
||||
@ -185,8 +185,8 @@ BOOST_AUTO_TEST_CASE(TransmissibilityMultipliersLegacyGridInterface)
|
||||
/////
|
||||
// create a DerivedGeology object _with_ transmissibility multipliers involved for
|
||||
// the negative faces
|
||||
Opm::DeckConstPtr multMinusDeck = parser->parseString(multMinusDeckString, parseMode);
|
||||
Opm::EclipseStateConstPtr multMinusEclipseState(new Opm::EclipseState(multMinusDeck , parseMode));
|
||||
Opm::DeckConstPtr multMinusDeck = parser->parseString(multMinusDeckString, parseContext);
|
||||
Opm::EclipseStateConstPtr multMinusEclipseState(new Opm::EclipseState(multMinusDeck , parseContext));
|
||||
|
||||
auto multMinusGridManager = std::make_shared<Opm::GridManager>(multMinusEclipseState->getEclipseGrid());
|
||||
auto multMinusProps = std::make_shared<Opm::BlackoilPropsAdFromDeck>(multMinusDeck, multMinusEclipseState, *(multMinusGridManager->c_grid()));
|
||||
@ -196,8 +196,8 @@ BOOST_AUTO_TEST_CASE(TransmissibilityMultipliersLegacyGridInterface)
|
||||
|
||||
/////
|
||||
// create a DerivedGeology object with the NTG keyword involved
|
||||
Opm::DeckConstPtr ntgDeck = parser->parseString(ntgDeckString, parseMode);
|
||||
Opm::EclipseStateConstPtr ntgEclipseState(new Opm::EclipseState(ntgDeck, parseMode));
|
||||
Opm::DeckConstPtr ntgDeck = parser->parseString(ntgDeckString, parseContext);
|
||||
Opm::EclipseStateConstPtr ntgEclipseState(new Opm::EclipseState(ntgDeck, parseContext));
|
||||
|
||||
auto ntgGridManager = std::make_shared<Opm::GridManager>(ntgEclipseState->getEclipseGrid());
|
||||
auto ntgProps = std::make_shared<Opm::BlackoilPropsAdFromDeck>(ntgDeck, ntgEclipseState, *(ntgGridManager->c_grid()));
|
||||
@ -273,12 +273,12 @@ BOOST_AUTO_TEST_CASE(TransmissibilityMultipliersCpGrid)
|
||||
|
||||
Opm::parameter::ParameterGroup param;
|
||||
Opm::ParserPtr parser(new Opm::Parser() );
|
||||
Opm::ParseMode parseMode;
|
||||
Opm::ParseContext parseContext;
|
||||
|
||||
/////
|
||||
// create a DerivedGeology object without any multipliers involved
|
||||
Opm::DeckConstPtr origDeck = parser->parseString(origDeckString , parseMode);
|
||||
Opm::EclipseStateConstPtr origEclipseState(new Opm::EclipseState(origDeck , parseMode));
|
||||
Opm::DeckConstPtr origDeck = parser->parseString(origDeckString , parseContext);
|
||||
Opm::EclipseStateConstPtr origEclipseState(new Opm::EclipseState(origDeck , parseContext));
|
||||
|
||||
auto origGrid = std::make_shared<Dune::CpGrid>();
|
||||
origGrid->processEclipseFormat(origEclipseState->getEclipseGrid(), 0.0, false);
|
||||
@ -292,8 +292,8 @@ BOOST_AUTO_TEST_CASE(TransmissibilityMultipliersCpGrid)
|
||||
|
||||
/////
|
||||
// create a DerivedGeology object _with_ transmissibility multipliers involved
|
||||
Opm::DeckConstPtr multDeck = parser->parseString(multDeckString,parseMode);
|
||||
Opm::EclipseStateConstPtr multEclipseState(new Opm::EclipseState(multDeck, parseMode));
|
||||
Opm::DeckConstPtr multDeck = parser->parseString(multDeckString,parseContext);
|
||||
Opm::EclipseStateConstPtr multEclipseState(new Opm::EclipseState(multDeck, parseContext));
|
||||
|
||||
auto multGrid = std::make_shared<Dune::CpGrid>();
|
||||
multGrid->processEclipseFormat(multEclipseState->getEclipseGrid(), 0.0, false);
|
||||
@ -306,8 +306,8 @@ BOOST_AUTO_TEST_CASE(TransmissibilityMultipliersCpGrid)
|
||||
/////
|
||||
// create a DerivedGeology object _with_ transmissibility multipliers involved for
|
||||
// the negative faces
|
||||
Opm::DeckConstPtr multMinusDeck = parser->parseString(multMinusDeckString , parseMode);
|
||||
Opm::EclipseStateConstPtr multMinusEclipseState(new Opm::EclipseState(multMinusDeck, parseMode));
|
||||
Opm::DeckConstPtr multMinusDeck = parser->parseString(multMinusDeckString , parseContext);
|
||||
Opm::EclipseStateConstPtr multMinusEclipseState(new Opm::EclipseState(multMinusDeck, parseContext));
|
||||
|
||||
auto multMinusGrid = std::make_shared<Dune::CpGrid>();
|
||||
multMinusGrid->processEclipseFormat(multMinusEclipseState->getEclipseGrid(), 0.0, false);
|
||||
@ -320,8 +320,8 @@ BOOST_AUTO_TEST_CASE(TransmissibilityMultipliersCpGrid)
|
||||
|
||||
/////
|
||||
// create a DerivedGeology object with the NTG keyword involved
|
||||
Opm::DeckConstPtr ntgDeck = parser->parseString(ntgDeckString, parseMode);
|
||||
Opm::EclipseStateConstPtr ntgEclipseState(new Opm::EclipseState(ntgDeck, parseMode));
|
||||
Opm::DeckConstPtr ntgDeck = parser->parseString(ntgDeckString, parseContext);
|
||||
Opm::EclipseStateConstPtr ntgEclipseState(new Opm::EclipseState(ntgDeck, parseContext));
|
||||
|
||||
auto ntgGrid = std::make_shared<Dune::CpGrid>();
|
||||
ntgGrid->processEclipseFormat(ntgEclipseState->getEclipseGrid(), 0.0, false);
|
||||
|
@ -39,7 +39,7 @@
|
||||
#include <opm/common/utility/platform_dependent/reenable_warnings.h>
|
||||
|
||||
#include <opm/core/wells.h>
|
||||
#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/checkDeck.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
@ -1047,7 +1047,7 @@ VFPPROD \n\
|
||||
std::shared_ptr<Opm::UnitSystem> units(Opm::UnitSystem::newFIELD());
|
||||
|
||||
Opm::ParserPtr parser(new Opm::Parser());
|
||||
Opm::ParseMode parse_mode;
|
||||
Opm::ParseContext parse_mode;
|
||||
deck = parser->parseString(table_str, parse_mode);
|
||||
|
||||
BOOST_REQUIRE(deck->hasKeyword("VFPPROD"));
|
||||
@ -1108,7 +1108,7 @@ BOOST_AUTO_TEST_CASE(ParseInterpolateRealisticVFPPROD)
|
||||
std::shared_ptr<Opm::UnitSystem> units(Opm::UnitSystem::newMETRIC());
|
||||
|
||||
Opm::ParserPtr parser(new Opm::Parser());
|
||||
Opm::ParseMode parse_mode;
|
||||
Opm::ParseContext parse_mode;
|
||||
boost::filesystem::path file("VFPPROD2");
|
||||
|
||||
deck = parser->parseFile(file.string(), parse_mode);
|
||||
|
Loading…
Reference in New Issue
Block a user