rename ParseMode as ParseContext in IntegrationTests folder.
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
|
||||
#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/EclipseState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/GridProperty.hpp>
|
||||
@@ -42,8 +42,8 @@ EclipseState makeState(const std::string& fileName);
|
||||
EclipseState makeState(const std::string& fileName) {
|
||||
ParserPtr parser(new Parser( ));
|
||||
boost::filesystem::path boxFile(fileName);
|
||||
DeckPtr deck = parser->parseFile(boxFile.string(), ParseMode());
|
||||
EclipseState state(deck , ParseMode());
|
||||
DeckPtr deck = parser->parseFile(boxFile.string(), ParseContext());
|
||||
EclipseState state(deck , ParseContext());
|
||||
return state;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <boost/test/test_tools.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>
|
||||
#include <opm/parser/eclipse/EclipseState/checkDeck.hpp>
|
||||
@@ -50,7 +50,7 @@ BOOST_AUTO_TEST_CASE( KeywordInCorrectSection ) {
|
||||
"SOLUTION\n"
|
||||
"SCHEDULE\n";
|
||||
|
||||
auto deck = parser->parseString(correctDeckString, Opm::ParseMode());
|
||||
auto deck = parser->parseString(correctDeckString, Opm::ParseContext());
|
||||
BOOST_CHECK(Opm::checkDeck(deck, parser));
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ BOOST_AUTO_TEST_CASE( KeywordInCorrectSection ) {
|
||||
"SOLUTION\n"
|
||||
"SCHEDULE\n";
|
||||
|
||||
auto deck = parser->parseString(correctDeckString, Opm::ParseMode());
|
||||
auto deck = parser->parseString(correctDeckString, Opm::ParseContext());
|
||||
BOOST_CHECK(!Opm::checkDeck(deck, parser));
|
||||
BOOST_CHECK(Opm::checkDeck(deck, parser, ~Opm::SectionTopology));
|
||||
}
|
||||
@@ -89,7 +89,7 @@ BOOST_AUTO_TEST_CASE( KeywordInCorrectSection ) {
|
||||
"SOLUTION\n"
|
||||
"SCHEDULE\n";
|
||||
|
||||
auto deck = parser->parseString(incorrectDeckString, Opm::ParseMode());
|
||||
auto deck = parser->parseString(incorrectDeckString, Opm::ParseContext());
|
||||
BOOST_CHECK(!Opm::checkDeck(deck, parser));
|
||||
|
||||
// this is supposed to succeed as we don't ensure that all keywords are in the
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckKeyword.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 <opm/parser/eclipse/EclipseState/Schedule/Completion.hpp>
|
||||
|
||||
@@ -44,7 +44,7 @@ BOOST_AUTO_TEST_CASE( CreateCompletionsFromRecord ) {
|
||||
|
||||
ParserPtr parser(new Parser());
|
||||
boost::filesystem::path scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_COMPDAT1");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile.string(), ParseMode());
|
||||
DeckPtr deck = parser->parseFile(scheduleFile.string(), ParseContext());
|
||||
const auto& COMPDAT1 = deck->getKeyword("COMPDAT" , 0);
|
||||
const auto& line0 = COMPDAT1.getRecord(0);
|
||||
const auto& line1 = COMPDAT1.getRecord(1);
|
||||
@@ -90,7 +90,7 @@ BOOST_AUTO_TEST_CASE( CreateCompletionsFromKeyword ) {
|
||||
|
||||
ParserPtr parser(new Parser());
|
||||
boost::filesystem::path scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_COMPDAT1");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile.string(), ParseMode());
|
||||
DeckPtr deck = parser->parseFile(scheduleFile.string(), ParseContext());
|
||||
const auto& COMPDAT1 = deck->getKeyword("COMPDAT" , 1);
|
||||
|
||||
std::map< std::string , std::vector<CompletionPtr> > completions = Completion::completionsFromCOMPDATKeyword( COMPDAT1 );
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
||||
#include <opm/parser/eclipse/Deck/Section.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/Grid/EclipseGrid.hpp>
|
||||
|
||||
using namespace Opm;
|
||||
@@ -38,7 +38,7 @@ using namespace Opm;
|
||||
BOOST_AUTO_TEST_CASE(CreateCPGrid) {
|
||||
ParserPtr parser(new Parser());
|
||||
boost::filesystem::path scheduleFile("testdata/integration_tests/GRID/CORNERPOINT.DATA");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile.string(), ParseMode());
|
||||
DeckPtr deck = parser->parseFile(scheduleFile.string(), ParseContext());
|
||||
std::shared_ptr<EclipseGrid> grid(new EclipseGrid( deck ));
|
||||
|
||||
BOOST_CHECK_EQUAL( 10U , grid->getNX( ));
|
||||
@@ -51,7 +51,7 @@ BOOST_AUTO_TEST_CASE(CreateCPGrid) {
|
||||
BOOST_AUTO_TEST_CASE(CreateCPActnumGrid) {
|
||||
ParserPtr parser(new Parser());
|
||||
boost::filesystem::path scheduleFile("testdata/integration_tests/GRID/CORNERPOINT_ACTNUM.DATA");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile.string(), ParseMode());
|
||||
DeckPtr deck = parser->parseFile(scheduleFile.string(), ParseContext());
|
||||
std::shared_ptr<EclipseGrid> grid(new EclipseGrid( deck ));
|
||||
|
||||
BOOST_CHECK_EQUAL( 10U , grid->getNX( ));
|
||||
@@ -64,7 +64,7 @@ BOOST_AUTO_TEST_CASE(CreateCPActnumGrid) {
|
||||
BOOST_AUTO_TEST_CASE(ExportFromCPGridAllActive) {
|
||||
ParserPtr parser(new Parser());
|
||||
boost::filesystem::path scheduleFile("testdata/integration_tests/GRID/CORNERPOINT.DATA");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile.string(), ParseMode());
|
||||
DeckPtr deck = parser->parseFile(scheduleFile.string(), ParseContext());
|
||||
|
||||
std::shared_ptr<EclipseGrid> grid(new EclipseGrid( deck ));
|
||||
|
||||
@@ -81,7 +81,7 @@ BOOST_AUTO_TEST_CASE(ExportFromCPGridAllActive) {
|
||||
BOOST_AUTO_TEST_CASE(ExportFromCPGridACTNUM) {
|
||||
ParserPtr parser(new Parser());
|
||||
boost::filesystem::path scheduleFile("testdata/integration_tests/GRID/CORNERPOINT_ACTNUM.DATA");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile.string(), ParseMode());
|
||||
DeckPtr deck = parser->parseFile(scheduleFile.string(), ParseContext());
|
||||
|
||||
std::shared_ptr<EclipseGrid> grid(new EclipseGrid( deck ));
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include <opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/TimeMap.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
|
||||
using namespace Opm;
|
||||
@@ -300,10 +300,10 @@ BOOST_AUTO_TEST_CASE( NorneResttartConfig ) {
|
||||
rptConfig.push_back( std::make_tuple(241 , true , boost::gregorian::date( 2006,10,10)) );
|
||||
|
||||
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
DeckConstPtr deck = parser->parseFile("testdata/integration_tests/IOConfig/RPTRST_DECK.DATA", parseMode);
|
||||
EclipseState state( deck , parseMode );
|
||||
DeckConstPtr deck = parser->parseFile("testdata/integration_tests/IOConfig/RPTRST_DECK.DATA", parseContext);
|
||||
EclipseState state( deck , parseContext );
|
||||
|
||||
verifyRestartConfig(state.getIOConfigConst(), rptConfig);
|
||||
}
|
||||
@@ -345,10 +345,10 @@ BOOST_AUTO_TEST_CASE( RestartConfig2 ) {
|
||||
else rptConfig.push_back( std::make_tuple(report_step, false, boost::gregorian::date(2000,1,1)));
|
||||
}
|
||||
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
DeckConstPtr deck = parser->parseFile("testdata/integration_tests/IOConfig/RPT_TEST2.DATA", parseMode);
|
||||
EclipseState state( deck , parseMode );
|
||||
DeckConstPtr deck = parser->parseFile("testdata/integration_tests/IOConfig/RPT_TEST2.DATA", parseContext);
|
||||
EclipseState state( deck , parseContext );
|
||||
|
||||
verifyRestartConfig(state.getIOConfigConst(), rptConfig);
|
||||
}
|
||||
@@ -499,10 +499,10 @@ void fillRptConfig(std::vector<std::tuple<int, bool, boost::gregorian::date>>& r
|
||||
BOOST_AUTO_TEST_CASE( SPE1CASE2_BASIC5_SET_ON_TIMESTEP_1 ) {
|
||||
|
||||
//Write reportfile every first day of a month
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
DeckConstPtr deck = parser->parseFile("testdata/integration_tests/IOConfig/SPE1CASE2.DATA", parseMode);
|
||||
EclipseState state( deck , parseMode );
|
||||
DeckConstPtr deck = parser->parseFile("testdata/integration_tests/IOConfig/SPE1CASE2.DATA", parseContext);
|
||||
EclipseState state( deck , parseContext );
|
||||
|
||||
std::shared_ptr<IOConfig> ioconfig = state.getIOConfig();
|
||||
|
||||
@@ -524,10 +524,10 @@ BOOST_AUTO_TEST_CASE( SPE1CASE2_BASIC5_SET_ON_TIMESTEP_1 ) {
|
||||
BOOST_AUTO_TEST_CASE( SPE1CASE2_BASIC5_SET_ON_TIMESTEP_13 ) {
|
||||
|
||||
//Write reportfile every first day of a month
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
DeckConstPtr deck = parser->parseFile("testdata/integration_tests/IOConfig/SPE1CASE2.DATA", parseMode);
|
||||
EclipseState state( deck , parseMode );
|
||||
DeckConstPtr deck = parser->parseFile("testdata/integration_tests/IOConfig/SPE1CASE2.DATA", parseContext);
|
||||
EclipseState state( deck , parseContext );
|
||||
std::shared_ptr<IOConfig> ioconfig = state.getIOConfig();
|
||||
|
||||
int basic = 5;
|
||||
@@ -555,10 +555,10 @@ BOOST_AUTO_TEST_CASE( SPE1CASE2_BASIC5_SET_ON_TIMESTEP_13 ) {
|
||||
BOOST_AUTO_TEST_CASE( SPE1CASE2_BASIC5_SET_ON_TIMESTEP_14 ) {
|
||||
|
||||
//Write reportfile every first day of a month
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
DeckConstPtr deck = parser->parseFile("testdata/integration_tests/IOConfig/SPE1CASE2.DATA", parseMode);
|
||||
EclipseState state( deck , parseMode );
|
||||
DeckConstPtr deck = parser->parseFile("testdata/integration_tests/IOConfig/SPE1CASE2.DATA", parseContext);
|
||||
EclipseState state( deck , parseContext );
|
||||
std::shared_ptr<IOConfig> ioconfig = state.getIOConfig();
|
||||
|
||||
int basic = 5;
|
||||
@@ -583,10 +583,10 @@ BOOST_AUTO_TEST_CASE( SPE1CASE2_BASIC5_SET_ON_TIMESTEP_14 ) {
|
||||
BOOST_AUTO_TEST_CASE( SPE1CASE2_BASIC5_SET_ON_TIMESTEP_37 ) {
|
||||
|
||||
//Write reportfile every first day of a month
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
DeckConstPtr deck = parser->parseFile("testdata/integration_tests/IOConfig/SPE1CASE2.DATA", parseMode);
|
||||
EclipseState state( deck , parseMode );
|
||||
DeckConstPtr deck = parser->parseFile("testdata/integration_tests/IOConfig/SPE1CASE2.DATA", parseContext);
|
||||
EclipseState state( deck , parseContext );
|
||||
std::shared_ptr<IOConfig> ioconfig = state.getIOConfig();
|
||||
|
||||
int basic = 5;
|
||||
@@ -641,11 +641,11 @@ BOOST_AUTO_TEST_CASE( SPE1CASE2_BASIC5_FREQ10_SET_ON_TIMESTEP_10 ) {
|
||||
}
|
||||
}
|
||||
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
DeckConstPtr deck = parser->parseFile("testdata/integration_tests/IOConfig/SPE1CASE2.DATA", parseMode);
|
||||
DeckConstPtr deck = parser->parseFile("testdata/integration_tests/IOConfig/SPE1CASE2.DATA", parseContext);
|
||||
|
||||
EclipseState state( deck , parseMode );
|
||||
EclipseState state( deck , parseContext );
|
||||
std::shared_ptr<IOConfig> ioconfig = state.getIOConfig();
|
||||
|
||||
int basic = 5;
|
||||
@@ -675,11 +675,11 @@ BOOST_AUTO_TEST_CASE( SPE1CASE2_BASIC5_FREQ40_SET_ON_TIMESTEP_1 ) {
|
||||
}
|
||||
}
|
||||
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
DeckConstPtr deck = parser->parseFile("testdata/integration_tests/IOConfig/SPE1CASE2.DATA", parseMode);
|
||||
DeckConstPtr deck = parser->parseFile("testdata/integration_tests/IOConfig/SPE1CASE2.DATA", parseContext);
|
||||
|
||||
EclipseState state( deck , parseMode );
|
||||
EclipseState state( deck , parseContext );
|
||||
std::shared_ptr<IOConfig> ioconfig = state.getIOConfig();
|
||||
|
||||
int basic = 5;
|
||||
@@ -699,10 +699,10 @@ BOOST_AUTO_TEST_CASE( SPE1CASE2_BASIC5_FREQ40_SET_ON_TIMESTEP_1 ) {
|
||||
BOOST_AUTO_TEST_CASE( SPE1CASE2_BASIC5_FREQ40_SET_ON_TIMESTEP_14 ) {
|
||||
|
||||
//Write reportfile every first day of a month, with frequency 40
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
DeckConstPtr deck = parser->parseFile("testdata/integration_tests/IOConfig/SPE1CASE2.DATA", parseMode);
|
||||
EclipseState state( deck , parseMode );
|
||||
DeckConstPtr deck = parser->parseFile("testdata/integration_tests/IOConfig/SPE1CASE2.DATA", parseContext);
|
||||
EclipseState state( deck , parseContext );
|
||||
std::shared_ptr<IOConfig> ioconfig = state.getIOConfig();
|
||||
|
||||
int basic = 5;
|
||||
@@ -764,11 +764,11 @@ BOOST_AUTO_TEST_CASE( SPE1CASE2_BASIC4_SET_ON_TIMESTEP_1 ) {
|
||||
}
|
||||
}
|
||||
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
DeckConstPtr deck = parser->parseFile("testdata/integration_tests/IOConfig/SPE1CASE2.DATA", parseMode);
|
||||
DeckConstPtr deck = parser->parseFile("testdata/integration_tests/IOConfig/SPE1CASE2.DATA", parseContext);
|
||||
|
||||
EclipseState state( deck , parseMode );
|
||||
EclipseState state( deck , parseContext );
|
||||
std::shared_ptr<IOConfig> ioconfig = state.getIOConfig();
|
||||
|
||||
int basic = 4;
|
||||
@@ -812,11 +812,11 @@ BOOST_AUTO_TEST_CASE( SPE1CASE2_BASIC4_SET_ON_TIMESTEP_12 ) {
|
||||
}
|
||||
|
||||
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
DeckConstPtr deck = parser->parseFile("testdata/integration_tests/IOConfig/SPE1CASE2.DATA", parseMode);
|
||||
DeckConstPtr deck = parser->parseFile("testdata/integration_tests/IOConfig/SPE1CASE2.DATA", parseContext);
|
||||
|
||||
EclipseState state( deck , parseMode );
|
||||
EclipseState state( deck , parseContext );
|
||||
std::shared_ptr<IOConfig> ioconfig = state.getIOConfig();
|
||||
|
||||
|
||||
@@ -858,11 +858,11 @@ BOOST_AUTO_TEST_CASE( SPE1CASE2_BASIC4_SET_ON_TIMESTEP_13 ) {
|
||||
}
|
||||
|
||||
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
DeckConstPtr deck = parser->parseFile("testdata/integration_tests/IOConfig/SPE1CASE2.DATA", parseMode);
|
||||
DeckConstPtr deck = parser->parseFile("testdata/integration_tests/IOConfig/SPE1CASE2.DATA", parseContext);
|
||||
|
||||
EclipseState state( deck , parseMode );
|
||||
EclipseState state( deck , parseContext );
|
||||
std::shared_ptr<IOConfig> ioconfig = state.getIOConfig();
|
||||
|
||||
|
||||
@@ -894,11 +894,11 @@ BOOST_AUTO_TEST_CASE( SPE1CASE2_BASIC4_FREQ3_SET_ON_TIMESTEP_13 ) {
|
||||
}
|
||||
|
||||
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
DeckConstPtr deck = parser->parseFile("testdata/integration_tests/IOConfig/SPE1CASE2.DATA", parseMode);
|
||||
DeckConstPtr deck = parser->parseFile("testdata/integration_tests/IOConfig/SPE1CASE2.DATA", parseContext);
|
||||
|
||||
EclipseState state( deck , parseMode );
|
||||
EclipseState state( deck , parseContext );
|
||||
std::shared_ptr<IOConfig> ioconfig = state.getIOConfig();
|
||||
|
||||
|
||||
@@ -973,11 +973,11 @@ BOOST_AUTO_TEST_CASE( SPE1CASE2_BASIC3_FREQ5_SET_ON_TIMESTEP_11 ) {
|
||||
}
|
||||
|
||||
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
DeckConstPtr deck = parser->parseFile("testdata/integration_tests/IOConfig/SPE1CASE2.DATA", parseMode);
|
||||
DeckConstPtr deck = parser->parseFile("testdata/integration_tests/IOConfig/SPE1CASE2.DATA", parseContext);
|
||||
|
||||
EclipseState state( deck , parseMode );
|
||||
EclipseState state( deck , parseContext );
|
||||
std::shared_ptr<IOConfig> ioconfig = state.getIOConfig();
|
||||
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#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/Parser/ParserRecord.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserIntItem.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserStringItem.hpp>
|
||||
@@ -151,7 +151,7 @@ BOOST_AUTO_TEST_CASE(parse_fileWithWWCTKeyword_deckReturned) {
|
||||
path datafile;
|
||||
ParserPtr parser(new Parser());
|
||||
createDeckWithInclude (datafile, "");
|
||||
DeckConstPtr deck = parser->parseFile(datafile.string(), ParseMode());
|
||||
DeckConstPtr deck = parser->parseFile(datafile.string(), ParseContext());
|
||||
|
||||
BOOST_CHECK( deck->hasKeyword("START"));
|
||||
BOOST_CHECK( deck->hasKeyword("DIMENS"));
|
||||
@@ -162,7 +162,7 @@ BOOST_AUTO_TEST_CASE(parse_fileWithENDINCKeyword_deckReturned) {
|
||||
path datafile;
|
||||
ParserPtr parser(new Parser());
|
||||
createDeckWithInclude (datafile, "ENDINC");
|
||||
DeckConstPtr deck = parser->parseFile(datafile.string(), ParseMode());
|
||||
DeckConstPtr deck = parser->parseFile(datafile.string(), ParseContext());
|
||||
|
||||
BOOST_CHECK( deck->hasKeyword("START"));
|
||||
BOOST_CHECK( !deck->hasKeyword("DIMENS"));
|
||||
@@ -173,7 +173,7 @@ BOOST_AUTO_TEST_CASE(parse_fileWithENDKeyword_deckReturned) {
|
||||
path datafile;
|
||||
ParserPtr parser(new Parser());
|
||||
createDeckWithInclude (datafile, "END");
|
||||
DeckConstPtr deck = parser->parseFile(datafile.string(), ParseMode());
|
||||
DeckConstPtr deck = parser->parseFile(datafile.string(), ParseContext());
|
||||
|
||||
BOOST_CHECK( deck->hasKeyword("START"));
|
||||
BOOST_CHECK( !deck->hasKeyword("DIMENS"));
|
||||
@@ -184,7 +184,7 @@ BOOST_AUTO_TEST_CASE(parse_fileWithPathsKeyword_IncludeExtendsPath) {
|
||||
path datafile;
|
||||
ParserPtr parser(new Parser());
|
||||
createDeckWithInclude (datafile, "");
|
||||
DeckConstPtr deck = parser->parseFile(datafile.string(), ParseMode());
|
||||
DeckConstPtr deck = parser->parseFile(datafile.string(), ParseContext());
|
||||
|
||||
BOOST_CHECK( deck->hasKeyword("TITLE"));
|
||||
BOOST_CHECK( deck->hasKeyword("BOX"));
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckRecord.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/Parser/ParserIntItem.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserKeyword.hpp>
|
||||
@@ -69,7 +69,7 @@ BOOST_AUTO_TEST_CASE(parse_fileWithWWCTKeyword_deckReturned) {
|
||||
ParserPtr parser = createWWCTParser();
|
||||
BOOST_CHECK( parser->isRecognizedKeyword("WWCT"));
|
||||
BOOST_CHECK( parser->isRecognizedKeyword("SUMMARY"));
|
||||
BOOST_CHECK_NO_THROW( parser->parseFile(singleKeywordFile.string(), ParseMode()) );
|
||||
BOOST_CHECK_NO_THROW( parser->parseFile(singleKeywordFile.string(), ParseContext()) );
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(parse_stringWithWWCTKeyword_deckReturned) {
|
||||
@@ -83,7 +83,7 @@ BOOST_AUTO_TEST_CASE(parse_stringWithWWCTKeyword_deckReturned) {
|
||||
ParserPtr parser = createWWCTParser();
|
||||
BOOST_CHECK( parser->isRecognizedKeyword("WWCT"));
|
||||
BOOST_CHECK( parser->isRecognizedKeyword("SUMMARY"));
|
||||
BOOST_CHECK_NO_THROW(DeckPtr deck = parser->parseString(wwctString, ParseMode()));
|
||||
BOOST_CHECK_NO_THROW(DeckPtr deck = parser->parseString(wwctString, ParseContext()));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(parse_streamWithWWCTKeyword_deckReturned) {
|
||||
@@ -98,13 +98,13 @@ BOOST_AUTO_TEST_CASE(parse_streamWithWWCTKeyword_deckReturned) {
|
||||
ParserPtr parser = createWWCTParser();
|
||||
BOOST_CHECK( parser->isRecognizedKeyword("WWCT"));
|
||||
BOOST_CHECK( parser->isRecognizedKeyword("SUMMARY"));
|
||||
BOOST_CHECK_NO_THROW(DeckPtr deck = parser->parseStream(wwctStream, ParseMode()));
|
||||
BOOST_CHECK_NO_THROW(DeckPtr deck = parser->parseStream(wwctStream, ParseContext()));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(parse_fileWithWWCTKeyword_deckHasWWCT) {
|
||||
boost::filesystem::path singleKeywordFile("testdata/integration_tests/wwct.data");
|
||||
ParserPtr parser = createWWCTParser();
|
||||
DeckPtr deck = parser->parseFile(singleKeywordFile.string(), ParseMode());
|
||||
DeckPtr deck = parser->parseFile(singleKeywordFile.string(), ParseContext());
|
||||
BOOST_CHECK(deck->hasKeyword("SUMMARY"));
|
||||
BOOST_CHECK(deck->hasKeyword("WWCT"));
|
||||
}
|
||||
@@ -112,7 +112,7 @@ BOOST_AUTO_TEST_CASE(parse_fileWithWWCTKeyword_deckHasWWCT) {
|
||||
BOOST_AUTO_TEST_CASE(parse_fileWithWWCTKeyword_dataIsCorrect) {
|
||||
boost::filesystem::path singleKeywordFile("testdata/integration_tests/wwct.data");
|
||||
ParserPtr parser = createWWCTParser();
|
||||
DeckPtr deck = parser->parseFile(singleKeywordFile.string(), ParseMode());
|
||||
DeckPtr deck = parser->parseFile(singleKeywordFile.string(), ParseContext());
|
||||
BOOST_CHECK_EQUAL("WELL-1", deck->getKeyword("WWCT" , 0).getRecord(0).getItem(0).get< std::string >(0));
|
||||
BOOST_CHECK_EQUAL("WELL-2", deck->getKeyword("WWCT" , 0).getRecord(0).getItem(0).get< std::string >(1));
|
||||
}
|
||||
@@ -160,14 +160,14 @@ BOOST_AUTO_TEST_CASE(parse_fileWithBPRKeyword_deckReturned) {
|
||||
boost::filesystem::path singleKeywordFile("testdata/integration_tests/bpr.data");
|
||||
ParserPtr parser = createBPRParser();
|
||||
|
||||
BOOST_CHECK_NO_THROW(parser->parseFile(singleKeywordFile.string(), ParseMode()));
|
||||
BOOST_CHECK_NO_THROW(parser->parseFile(singleKeywordFile.string(), ParseContext()));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(parse_fileWithBPRKeyword_DeckhasBRP) {
|
||||
boost::filesystem::path singleKeywordFile("testdata/integration_tests/bpr.data");
|
||||
|
||||
ParserPtr parser = createBPRParser();
|
||||
DeckPtr deck = parser->parseFile(singleKeywordFile.string(), ParseMode());
|
||||
DeckPtr deck = parser->parseFile(singleKeywordFile.string(), ParseContext());
|
||||
|
||||
BOOST_CHECK_EQUAL(true, deck->hasKeyword("BPR"));
|
||||
}
|
||||
@@ -176,7 +176,7 @@ BOOST_AUTO_TEST_CASE(parse_fileWithBPRKeyword_dataiscorrect) {
|
||||
boost::filesystem::path singleKeywordFile("testdata/integration_tests/bpr.data");
|
||||
|
||||
ParserPtr parser = createBPRParser();
|
||||
DeckPtr deck = parser->parseFile(singleKeywordFile.string(), ParseMode());
|
||||
DeckPtr deck = parser->parseFile(singleKeywordFile.string(), ParseContext());
|
||||
|
||||
const auto& keyword = deck->getKeyword("BPR" , 0);
|
||||
BOOST_CHECK_EQUAL(2U, keyword.size());
|
||||
@@ -198,7 +198,7 @@ BOOST_AUTO_TEST_CASE(parse_fileWithBPRKeyword_dataiscorrect) {
|
||||
/***************** Testing non-recognized keywords ********************/
|
||||
BOOST_AUTO_TEST_CASE(parse_unknownkeyword_exceptionthrown) {
|
||||
ParserPtr parser(new Parser());
|
||||
BOOST_CHECK_THROW( parser->parseFile("testdata/integration_tests/someobscureelements.data", ParseMode()), std::invalid_argument);
|
||||
BOOST_CHECK_THROW( parser->parseFile("testdata/integration_tests/someobscureelements.data", ParseContext()), std::invalid_argument);
|
||||
}
|
||||
|
||||
/*********************Testing truncated (default) records ***************************/
|
||||
@@ -207,7 +207,7 @@ BOOST_AUTO_TEST_CASE(parse_unknownkeyword_exceptionthrown) {
|
||||
// Datafile contains 3 RADFIN4 keywords. One fully specified, one with 2 out of 11 items, and one with no items.
|
||||
BOOST_AUTO_TEST_CASE(parse_truncatedrecords_deckFilledWithDefaults) {
|
||||
ParserPtr parser(new Parser());
|
||||
DeckPtr deck = parser->parseFile("testdata/integration_tests/truncated_records.data", ParseMode());
|
||||
DeckPtr deck = parser->parseFile("testdata/integration_tests/truncated_records.data", ParseContext());
|
||||
BOOST_CHECK_EQUAL(3U, deck->size());
|
||||
const auto& radfin4_0_full= deck->getKeyword("RADFIN4", 0);
|
||||
const auto& radfin4_1_partial= deck->getKeyword("RADFIN4", 1);
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/NNC.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/Grid/EclipseGrid.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
@@ -40,11 +40,11 @@ using namespace Opm;
|
||||
|
||||
BOOST_AUTO_TEST_CASE(noNNC)
|
||||
{
|
||||
Opm::ParseMode parseMode;
|
||||
Opm::ParseContext parseContext;
|
||||
const std::string filename = "testdata/integration_tests/NNC/noNNC.DATA";
|
||||
Opm::ParserPtr parser(new Opm::Parser());
|
||||
Opm::DeckConstPtr deck(parser->parseFile(filename, parseMode));
|
||||
Opm::EclipseStateConstPtr eclipseState(new EclipseState(deck , parseMode));
|
||||
Opm::DeckConstPtr deck(parser->parseFile(filename, parseContext));
|
||||
Opm::EclipseStateConstPtr eclipseState(new EclipseState(deck , parseContext));
|
||||
auto eclGrid = eclipseState->getEclipseGrid();
|
||||
Opm::NNC nnc(deck, eclGrid);
|
||||
BOOST_CHECK(!nnc.hasNNC());
|
||||
@@ -52,11 +52,11 @@ BOOST_AUTO_TEST_CASE(noNNC)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(readDeck)
|
||||
{
|
||||
Opm::ParseMode parseMode;
|
||||
Opm::ParseContext parseContext;
|
||||
const std::string filename = "testdata/integration_tests/NNC/NNC.DATA";
|
||||
Opm::ParserPtr parser(new Opm::Parser());
|
||||
Opm::DeckConstPtr deck(parser->parseFile(filename, parseMode));
|
||||
Opm::EclipseStateConstPtr eclipseState(new EclipseState(deck , parseMode));
|
||||
Opm::DeckConstPtr deck(parser->parseFile(filename, parseContext));
|
||||
Opm::EclipseStateConstPtr eclipseState(new EclipseState(deck , parseContext));
|
||||
auto eclGrid = eclipseState->getEclipseGrid();
|
||||
Opm::NNC nnc(deck, eclGrid);
|
||||
BOOST_CHECK(nnc.hasNNC());
|
||||
@@ -75,11 +75,11 @@ BOOST_AUTO_TEST_CASE(readDeck)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(addNNCfromDeck)
|
||||
{
|
||||
Opm::ParseMode parseMode;
|
||||
Opm::ParseContext parseContext;
|
||||
const std::string filename = "testdata/integration_tests/NNC/NNC.DATA";
|
||||
Opm::ParserPtr parser(new Opm::Parser());
|
||||
Opm::DeckConstPtr deck(parser->parseFile(filename, parseMode));
|
||||
Opm::EclipseStateConstPtr eclipseState(new EclipseState(deck , parseMode));
|
||||
Opm::DeckConstPtr deck(parser->parseFile(filename, parseContext));
|
||||
Opm::EclipseStateConstPtr eclipseState(new EclipseState(deck , parseContext));
|
||||
auto eclGrid = eclipseState->getEclipseGrid();
|
||||
Opm::NNC nnc(deck, eclGrid);
|
||||
const std::vector<NNCdata>& nncdata = nnc.nncdata();
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <opm/parser/eclipse/Deck/DeckRecord.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/Parser/ParserKeyword.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserRecord.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserIntItem.hpp>
|
||||
@@ -53,7 +53,7 @@ ENKRVD\n\
|
||||
|
||||
BOOST_AUTO_TEST_CASE( ParseMissingRECORD_THrows) {
|
||||
ParserPtr parser(new Parser());
|
||||
BOOST_CHECK_THROW( parser->parseString( dataMissingRecord , ParseMode()) , std::invalid_argument);
|
||||
BOOST_CHECK_THROW( parser->parseString( dataMissingRecord , ParseContext()) , std::invalid_argument);
|
||||
}
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ ENKRVD\n\
|
||||
|
||||
BOOST_AUTO_TEST_CASE( parse_DATAWithDefult_OK ) {
|
||||
ParserPtr parser(new Parser());
|
||||
DeckConstPtr deck = parser->parseString( data , ParseMode());
|
||||
DeckConstPtr deck = parser->parseString( data , ParseContext());
|
||||
const auto& keyword = deck->getKeyword( "ENKRVD" );
|
||||
const auto& rec0 = keyword.getRecord(0);
|
||||
const auto& rec1 = keyword.getRecord(1);
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckRecord.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/Parser/ParserRecord.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserIntItem.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserStringItem.hpp>
|
||||
@@ -42,7 +42,7 @@ using namespace Opm;
|
||||
BOOST_AUTO_TEST_CASE(ParseDENSITY) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string file("testdata/integration_tests/DENSITY/DENSITY1");
|
||||
DeckPtr deck = parser->parseFile(file, ParseMode());
|
||||
DeckPtr deck = parser->parseFile(file, ParseContext());
|
||||
const auto& densityKw = deck->getKeyword("DENSITY" , 0);
|
||||
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <opm/parser/eclipse/Deck/DeckKeyword.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/Parser/ParserRecord.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserIntItem.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserStringItem.hpp>
|
||||
@@ -41,7 +41,7 @@ BOOST_AUTO_TEST_CASE( parse_END_OK ) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string fileWithTitleKeyword("testdata/integration_tests/END/END1.txt");
|
||||
|
||||
DeckPtr deck = parser->parseFile(fileWithTitleKeyword, ParseMode());
|
||||
DeckPtr deck = parser->parseFile(fileWithTitleKeyword, ParseContext());
|
||||
|
||||
BOOST_CHECK_EQUAL(size_t(1), deck->size());
|
||||
BOOST_CHECK_EQUAL (true, deck->hasKeyword("OIL"));
|
||||
@@ -53,7 +53,7 @@ BOOST_AUTO_TEST_CASE( parse_ENDINC_OK ) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string fileWithTitleKeyword("testdata/integration_tests/END/ENDINC1.txt");
|
||||
|
||||
DeckPtr deck = parser->parseFile(fileWithTitleKeyword, ParseMode());
|
||||
DeckPtr deck = parser->parseFile(fileWithTitleKeyword, ParseContext());
|
||||
|
||||
BOOST_CHECK_EQUAL(size_t(1), deck->size());
|
||||
BOOST_CHECK_EQUAL (true, deck->hasKeyword("OIL"));
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckRecord.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/Parser/ParserRecord.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserIntItem.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserStringItem.hpp>
|
||||
@@ -40,11 +40,11 @@ using namespace Opm;
|
||||
|
||||
BOOST_AUTO_TEST_CASE( parse_EQUIL_MISSING_DIMS ) {
|
||||
Parser parser;
|
||||
ParseMode parseMode;
|
||||
parseMode.update(ParseMode::PARSE_MISSING_DIMS_KEYWORD, InputError::IGNORE);
|
||||
ParseContext parseContext;
|
||||
parseContext.update(ParseContext::PARSE_MISSING_DIMS_KEYWORD, InputError::IGNORE);
|
||||
const std::string equil = "EQUIL\n"
|
||||
"2469 382.4 1705.0 0.0 500 0.0 1 1 20 /";
|
||||
std::shared_ptr<const Deck> deck = parser.parseString(equil, parseMode);
|
||||
std::shared_ptr<const Deck> deck = parser.parseString(equil, parseContext);
|
||||
const auto& kw1 = deck->getKeyword("EQUIL" , 0);
|
||||
BOOST_CHECK_EQUAL( 1U , kw1.size() );
|
||||
|
||||
@@ -61,7 +61,7 @@ BOOST_AUTO_TEST_CASE( parse_EQUIL_MISSING_DIMS ) {
|
||||
BOOST_AUTO_TEST_CASE( parse_EQUIL_OK ) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string pvtgFile("testdata/integration_tests/EQUIL/EQUIL1");
|
||||
DeckPtr deck = parser->parseFile(pvtgFile, ParseMode());
|
||||
DeckPtr deck = parser->parseFile(pvtgFile, ParseContext());
|
||||
const auto& kw1 = deck->getKeyword("EQUIL" , 0);
|
||||
BOOST_CHECK_EQUAL( 3U , kw1.size() );
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#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/Parser/ParserRecord.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserIntItem.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserStringItem.hpp>
|
||||
@@ -41,17 +41,17 @@ using namespace Opm;
|
||||
|
||||
BOOST_AUTO_TEST_CASE( parse_MULTREGT_OK ) {
|
||||
ParserPtr parser(new Parser());
|
||||
DeckPtr deck = parser->parseFile("testdata/integration_tests/MULTREGT/MULTREGT", ParseMode());
|
||||
DeckPtr deck = parser->parseFile("testdata/integration_tests/MULTREGT/MULTREGT", ParseContext());
|
||||
BOOST_CHECK_NO_THROW( deck->getKeyword("MULTREGT" , 0); );
|
||||
}
|
||||
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE( MULTREGT_ECLIPSE_STATE ) {
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
DeckPtr deck = parser->parseFile("testdata/integration_tests/MULTREGT/MULTREGT.DATA", parseMode);
|
||||
EclipseState state(deck , parseMode);
|
||||
DeckPtr deck = parser->parseFile("testdata/integration_tests/MULTREGT/MULTREGT.DATA", parseContext);
|
||||
EclipseState state(deck , parseContext);
|
||||
auto transMult = state.getTransMult();
|
||||
|
||||
// Test NONNC
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckRecord.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>
|
||||
|
||||
using namespace Opm;
|
||||
@@ -39,7 +39,7 @@ BOOST_AUTO_TEST_CASE( PARSE_MULTISEGMENT_ABS ) {
|
||||
|
||||
ParserPtr parser(new Parser());
|
||||
std::string deckFile("testdata/integration_tests/SCHEDULE/SCHEDULE_MULTISEGMENT_WELL");
|
||||
DeckPtr deck = parser->parseFile(deckFile, ParseMode());
|
||||
DeckPtr deck = parser->parseFile(deckFile, ParseContext());
|
||||
// for WELSEGS keyword
|
||||
const auto& kw = deck->getKeyword("WELSEGS");
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckRecord.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/EclipseState/Tables/SorwmisTable.hpp>
|
||||
@@ -76,12 +76,12 @@ BOOST_AUTO_TEST_CASE( PARSE_SORWMIS)
|
||||
ParserPtr parser(new Parser());
|
||||
|
||||
// missing miscible keyword
|
||||
BOOST_CHECK_THROW (parser->parseString(sorwmisData, ParseMode()), std::invalid_argument );
|
||||
BOOST_CHECK_THROW (parser->parseString(sorwmisData, ParseContext()), std::invalid_argument );
|
||||
|
||||
//too many tables
|
||||
BOOST_CHECK_THROW( parser->parseString(miscibleTightData + sorwmisData, ParseMode()), std::invalid_argument);
|
||||
BOOST_CHECK_THROW( parser->parseString(miscibleTightData + sorwmisData, ParseContext()), std::invalid_argument);
|
||||
|
||||
DeckPtr deck1 = parser->parseString(miscibleData + sorwmisData, ParseMode());
|
||||
DeckPtr deck1 = parser->parseString(miscibleData + sorwmisData, ParseContext());
|
||||
|
||||
const auto& sorwmis = deck1->getKeyword("SORWMIS");
|
||||
const auto& miscible = deck1->getKeyword("MISCIBLE");
|
||||
@@ -114,7 +114,7 @@ BOOST_AUTO_TEST_CASE( PARSE_SGCWMIS)
|
||||
{
|
||||
ParserPtr parser(new Parser());
|
||||
|
||||
DeckPtr deck1 = parser->parseString(miscibleData + sgcwmisData, ParseMode());
|
||||
DeckPtr deck1 = parser->parseString(miscibleData + sgcwmisData, ParseContext());
|
||||
|
||||
const auto& sgcwmis = deck1->getKeyword("SGCWMIS");
|
||||
const auto& miscible = deck1->getKeyword("MISCIBLE");
|
||||
@@ -177,18 +177,18 @@ BOOST_AUTO_TEST_CASE(PARSE_MISC)
|
||||
ParserPtr parser(new Parser());
|
||||
|
||||
// out of range MISC keyword
|
||||
DeckPtr deck1 = parser->parseString(miscOutOfRangeData, ParseMode());
|
||||
DeckPtr deck1 = parser->parseString(miscOutOfRangeData, ParseContext());
|
||||
const auto& item = deck1->getKeyword("MISC").getRecord(0).getItem(0);
|
||||
Opm::MiscTable miscTable1(item);
|
||||
|
||||
|
||||
// too litle range of MISC keyword
|
||||
DeckPtr deck2 = parser->parseString(miscTooSmallRangeData, ParseMode());
|
||||
DeckPtr deck2 = parser->parseString(miscTooSmallRangeData, ParseContext());
|
||||
const auto& item2 = deck2->getKeyword("MISC").getRecord(0).getItem(0);
|
||||
Opm::MiscTable miscTable2(item2);
|
||||
|
||||
// test table input
|
||||
DeckPtr deck3 = parser->parseString(miscData, ParseMode());
|
||||
DeckPtr deck3 = parser->parseString(miscData, ParseContext());
|
||||
const auto& item3 = deck3->getKeyword("MISC").getRecord(0).getItem(0);
|
||||
Opm::MiscTable miscTable3(item3);
|
||||
BOOST_CHECK_EQUAL(3U, miscTable3.getSolventFractionColumn().size());
|
||||
@@ -211,7 +211,7 @@ BOOST_AUTO_TEST_CASE(PARSE_PMISC)
|
||||
ParserPtr parser(new Parser());
|
||||
|
||||
// test table input
|
||||
DeckPtr deck = parser->parseString(pmiscData, ParseMode());
|
||||
DeckPtr deck = parser->parseString(pmiscData, ParseContext());
|
||||
Opm::PmiscTable pmiscTable(deck->getKeyword("PMISC").getRecord(0).getItem(0));
|
||||
BOOST_CHECK_EQUAL(3U, pmiscTable.getOilPhasePressureColumn().size());
|
||||
BOOST_CHECK_EQUAL(200*1e5, pmiscTable.getOilPhasePressureColumn()[1]);
|
||||
@@ -233,7 +233,7 @@ MSFN\n\
|
||||
BOOST_AUTO_TEST_CASE(PARSE_MSFN)
|
||||
{
|
||||
ParserPtr parser(new Parser());
|
||||
DeckPtr deck = parser->parseString(msfnData, ParseMode());
|
||||
DeckPtr deck = parser->parseString(msfnData, ParseContext());
|
||||
|
||||
// test table input 1
|
||||
Opm::MsfnTable msfnTable1(deck->getKeyword("MSFN").getRecord(0).getItem(0));
|
||||
@@ -265,7 +265,7 @@ BOOST_AUTO_TEST_CASE(PARSE_TLPMIXPA)
|
||||
ParserPtr parser(new Parser());
|
||||
|
||||
// test table input
|
||||
DeckPtr deck = parser->parseString(tlpmixpa, ParseMode());
|
||||
DeckPtr deck = parser->parseString(tlpmixpa, ParseContext());
|
||||
Opm::TlpmixpaTable tlpmixpaTable(deck->getKeyword("TLPMIXPA").getRecord(0).getItem(0));
|
||||
BOOST_CHECK_EQUAL(3U, tlpmixpaTable.getOilPhasePressureColumn().size());
|
||||
BOOST_CHECK_EQUAL(200*1e5, tlpmixpaTable.getOilPhasePressureColumn()[1]);
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckKeyword.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>
|
||||
|
||||
using namespace Opm;
|
||||
@@ -36,7 +36,7 @@ using namespace Opm;
|
||||
BOOST_AUTO_TEST_CASE( PARSE_PLYADSS_OK) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string deckFile("testdata/integration_tests/POLYMER/plyadss.data");
|
||||
DeckPtr deck = parser->parseFile(deckFile, ParseMode());
|
||||
DeckPtr deck = parser->parseFile(deckFile, ParseContext());
|
||||
const auto& kw = deck->getKeyword("PLYADSS");
|
||||
|
||||
BOOST_CHECK_EQUAL( kw.size() , 11U );
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckRecord.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>
|
||||
|
||||
using namespace Opm;
|
||||
@@ -38,7 +38,7 @@ using namespace Opm;
|
||||
BOOST_AUTO_TEST_CASE( PARSE_PLYDHFLF_OK) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string deckFile("testdata/integration_tests/POLYMER/plydhflf.data");
|
||||
DeckPtr deck = parser->parseFile(deckFile, ParseMode());
|
||||
DeckPtr deck = parser->parseFile(deckFile, ParseContext());
|
||||
const auto& kw = deck->getKeyword("PLYDHFLF");
|
||||
const auto& rec = kw.getRecord(0);
|
||||
const auto& item = rec.getItem(0);
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckRecord.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>
|
||||
|
||||
using namespace Opm;
|
||||
@@ -38,7 +38,7 @@ using namespace Opm;
|
||||
BOOST_AUTO_TEST_CASE( PARSE_PLYSHLOG_OK) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string deckFile("testdata/integration_tests/POLYMER/plyshlog.data");
|
||||
DeckPtr deck = parser->parseFile(deckFile, ParseMode());
|
||||
DeckPtr deck = parser->parseFile(deckFile, ParseContext());
|
||||
const auto& kw = deck->getKeyword("PLYSHLOG");
|
||||
const auto& rec1 = kw.getRecord(0); // reference conditions
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckRecord.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>
|
||||
|
||||
using namespace Opm;
|
||||
@@ -38,7 +38,7 @@ using namespace Opm;
|
||||
BOOST_AUTO_TEST_CASE( PARSE_PLYVISC_OK) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string deckFile("testdata/integration_tests/POLYMER/plyvisc.data");
|
||||
DeckPtr deck = parser->parseFile(deckFile, ParseMode());
|
||||
DeckPtr deck = parser->parseFile(deckFile, ParseContext());
|
||||
const auto& kw = deck->getKeyword("PLYVISC");
|
||||
const auto& rec = kw.getRecord(0);
|
||||
const auto& item = rec.getItem(0);
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckKeyword.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/Parser/ParserRecord.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserIntItem.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserStringItem.hpp>
|
||||
@@ -40,7 +40,7 @@ using namespace Opm;
|
||||
BOOST_AUTO_TEST_CASE(ParsePOROandPERMX) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string poroFile("testdata/integration_tests/PORO/PORO1");
|
||||
DeckPtr deck = parser->parseFile(poroFile, ParseMode());
|
||||
DeckPtr deck = parser->parseFile(poroFile, ParseContext());
|
||||
const auto& kw1 = deck->getKeyword("PORO" , 0);
|
||||
const auto& kw2 = deck->getKeyword("PERMX" , 0);
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <opm/parser/eclipse/Deck/DeckRecord.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/Parser/ParserKeyword.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserRecord.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserIntItem.hpp>
|
||||
@@ -64,7 +64,7 @@ PVTG\n\
|
||||
|
||||
|
||||
static void check_parser(ParserPtr parser) {
|
||||
DeckPtr deck = parser->parseString(pvtgData, ParseMode());
|
||||
DeckPtr deck = parser->parseString(pvtgData, ParseContext());
|
||||
const auto& kw1 = deck->getKeyword("PVTG" , 0);
|
||||
BOOST_CHECK_EQUAL(5U , kw1.size());
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include <opm/parser/eclipse/Deck/DeckRecord.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/Parser/ParserKeyword.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserRecord.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserIntItem.hpp>
|
||||
@@ -68,7 +68,7 @@ PVTO\n\
|
||||
|
||||
|
||||
static void check_parser(ParserPtr parser) {
|
||||
DeckPtr deck = parser->parseString(pvtoData, ParseMode());
|
||||
DeckPtr deck = parser->parseString(pvtoData, ParseContext());
|
||||
const auto& kw1 = deck->getKeyword("PVTO" , 0);
|
||||
BOOST_CHECK_EQUAL(5U , kw1.size());
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckRecord.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/Parser/ParserRecord.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserIntItem.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserStringItem.hpp>
|
||||
@@ -41,7 +41,7 @@ using namespace Opm;
|
||||
BOOST_AUTO_TEST_CASE( parse_EQUIL_OK ) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string pvtgFile("testdata/integration_tests/RSVD/RSVD.txt");
|
||||
DeckPtr deck = parser->parseFile(pvtgFile, ParseMode());
|
||||
DeckPtr deck = parser->parseFile(pvtgFile, ParseContext());
|
||||
const auto& kw1 = deck->getKeyword("RSVD" , 0);
|
||||
BOOST_CHECK_EQUAL( 6U , kw1.size() );
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <opm/parser/eclipse/Deck/DeckRecord.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/Parser/ParserIntItem.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserDoubleItem.hpp>
|
||||
|
||||
@@ -56,7 +56,7 @@ const char *parserData =
|
||||
" 1.0 1.0 0.1 9.0 /\n";
|
||||
|
||||
static void check_parser(ParserPtr parser) {
|
||||
DeckPtr deck = parser->parseString(parserData, ParseMode());
|
||||
DeckPtr deck = parser->parseString(parserData, ParseContext());
|
||||
const auto& kw1 = deck->getKeyword("SGOF");
|
||||
BOOST_CHECK_EQUAL(1U , kw1.size());
|
||||
|
||||
@@ -68,7 +68,7 @@ static void check_parser(ParserPtr parser) {
|
||||
}
|
||||
|
||||
static void check_SgofTable(ParserPtr parser) {
|
||||
DeckPtr deck = parser->parseString(parserData, ParseMode());
|
||||
DeckPtr deck = parser->parseString(parserData, ParseContext());
|
||||
Opm::SgofTable sgofTable(deck->getKeyword("SGOF").getRecord(0).getItem(0));
|
||||
|
||||
BOOST_CHECK_EQUAL(10U, sgofTable.getSgColumn().size());
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <opm/parser/eclipse/Deck/DeckRecord.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/Parser/ParserIntItem.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserDoubleItem.hpp>
|
||||
|
||||
@@ -58,7 +58,7 @@ const char *parserData =
|
||||
" 1.0 0.0 1.0 0.0 /\n";
|
||||
|
||||
static void check_parser(ParserPtr parser) {
|
||||
DeckPtr deck = parser->parseString(parserData, ParseMode());
|
||||
DeckPtr deck = parser->parseString(parserData, ParseContext());
|
||||
const auto& kw1 = deck->getKeyword("SLGOF");
|
||||
BOOST_CHECK_EQUAL(1U , kw1.size());
|
||||
|
||||
@@ -70,7 +70,7 @@ static void check_parser(ParserPtr parser) {
|
||||
}
|
||||
|
||||
static void check_SlgofTable(ParserPtr parser) {
|
||||
DeckPtr deck = parser->parseString(parserData, ParseMode());
|
||||
DeckPtr deck = parser->parseString(parserData, ParseContext());
|
||||
Opm::SlgofTable slgofTable(deck->getKeyword("SLGOF").getRecord(0).getItem(0));
|
||||
|
||||
BOOST_CHECK_EQUAL(10U, slgofTable.getSlColumn().size());
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <opm/parser/eclipse/Deck/DeckRecord.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/Parser/ParserIntItem.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserDoubleItem.hpp>
|
||||
|
||||
@@ -58,7 +58,7 @@ const char *parserData =
|
||||
" 1.0 1* 0.1 9.0 /\n";
|
||||
|
||||
static void check_parser(ParserPtr parser) {
|
||||
DeckPtr deck = parser->parseString(parserData, ParseMode());
|
||||
DeckPtr deck = parser->parseString(parserData, ParseContext());
|
||||
const auto& kw1 = deck->getKeyword("SWOF");
|
||||
BOOST_CHECK_EQUAL(1U , kw1.size());
|
||||
|
||||
@@ -70,7 +70,7 @@ static void check_parser(ParserPtr parser) {
|
||||
}
|
||||
|
||||
static void check_SwofTable(ParserPtr parser) {
|
||||
DeckPtr deck = parser->parseString(parserData, ParseMode());
|
||||
DeckPtr deck = parser->parseString(parserData, ParseContext());
|
||||
Opm::SwofTable swofTable(deck->getKeyword("SWOF").getRecord(0).getItem(0));
|
||||
|
||||
BOOST_CHECK_EQUAL(10U, swofTable.getSwColumn().size());
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <opm/parser/eclipse/Deck/DeckRecord.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/Parser/ParserRecord.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserIntItem.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserStringItem.hpp>
|
||||
@@ -43,7 +43,7 @@ BOOST_AUTO_TEST_CASE( parse_TITLE_OK ) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string fileWithTitleKeyword("testdata/integration_tests/TITLE/TITLE1.txt");
|
||||
|
||||
DeckPtr deck = parser->parseFile(fileWithTitleKeyword, ParseMode());
|
||||
DeckPtr deck = parser->parseFile(fileWithTitleKeyword, ParseContext());
|
||||
|
||||
BOOST_CHECK_EQUAL(size_t(2), deck->size());
|
||||
BOOST_CHECK_EQUAL (true, deck->hasKeyword("TITLE"));
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#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/EclipseState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp>
|
||||
|
||||
@@ -40,9 +40,9 @@ using namespace Opm;
|
||||
BOOST_AUTO_TEST_CASE( PARSE_TOPS_OK) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string deckFile("testdata/integration_tests/GRID/TOPS.DATA");
|
||||
ParseMode parseMode;
|
||||
DeckPtr deck = parser->parseFile(deckFile, parseMode);
|
||||
EclipseState state(deck , parseMode);
|
||||
ParseContext parseContext;
|
||||
DeckPtr deck = parser->parseFile(deckFile, parseContext);
|
||||
EclipseState state(deck , parseContext);
|
||||
EclipseGridConstPtr grid = state.getEclipseGrid();
|
||||
|
||||
BOOST_CHECK_EQUAL( grid->getNX() , 9 );
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#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/Parser/ParserRecord.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserIntItem.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserStringItem.hpp>
|
||||
@@ -38,7 +38,7 @@ using namespace Opm;
|
||||
BOOST_AUTO_TEST_CASE(ParseTVDP) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string poroFile("testdata/integration_tests/TVDP/TVDP1");
|
||||
DeckPtr deck = parser->parseFile(poroFile, ParseMode());
|
||||
DeckPtr deck = parser->parseFile(poroFile, ParseContext());
|
||||
|
||||
BOOST_CHECK_EQUAL( false , deck->hasKeyword("TVDP*"));
|
||||
BOOST_CHECK( deck->hasKeyword("TVDPA"));
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckRecord.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/Parser/ParserRecord.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserIntItem.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserStringItem.hpp>
|
||||
@@ -45,7 +45,7 @@ BOOST_AUTO_TEST_CASE( parse_VFPPROD_OK ) {
|
||||
std::string file("testdata/integration_tests/VFPPROD/VFPPROD1");
|
||||
BOOST_CHECK( parser->isRecognizedKeyword("VFPPROD"));
|
||||
|
||||
DeckPtr deck = parser->parseFile(file, ParseMode());
|
||||
DeckPtr deck = parser->parseFile(file, ParseContext());
|
||||
|
||||
const auto& VFPPROD1 = deck->getKeyword("VFPPROD" , 0);
|
||||
const auto& BPR = deck->getKeyword("BPR" , 0);
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <opm/parser/eclipse/Deck/DeckRecord.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/Parser/ParserRecord.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserIntItem.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserStringItem.hpp>
|
||||
@@ -42,7 +42,7 @@ using namespace Opm;
|
||||
BOOST_AUTO_TEST_CASE( parse_WCHONHIST_OK ) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string wconhistFile("testdata/integration_tests/WCONHIST/WCONHIST1");
|
||||
DeckPtr deck = parser->parseFile(wconhistFile, ParseMode());
|
||||
DeckPtr deck = parser->parseFile(wconhistFile, ParseContext());
|
||||
const auto& kw1 = deck->getKeyword("WCONHIST" , 0);
|
||||
BOOST_CHECK_EQUAL( 3U , kw1.size() );
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#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/Parser/ParserRecord.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserIntItem.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserStringItem.hpp>
|
||||
@@ -53,7 +53,7 @@ BOOST_AUTO_TEST_CASE(ParseWellProbe) {
|
||||
BOOST_CHECK_THROW(parser->parseString(invalidDeckString), std::invalid_argument);
|
||||
*/
|
||||
|
||||
DeckPtr deck = parser->parseString(validDeckString, ParseMode());
|
||||
DeckPtr deck = parser->parseString(validDeckString, ParseContext());
|
||||
BOOST_CHECK( !deck->hasKeyword("WELL_PROBE"));
|
||||
BOOST_CHECK( deck->hasKeyword("WBHP"));
|
||||
BOOST_CHECK( deck->hasKeyword("WOPR"));
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#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/Parser/ParserRecord.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserIntItem.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserStringItem.hpp>
|
||||
@@ -42,10 +42,10 @@ using namespace Opm;
|
||||
BOOST_AUTO_TEST_CASE( parse_WCONPROD_OK ) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string wconprodFile("testdata/integration_tests/WellWithWildcards/WCONPROD1");
|
||||
DeckPtr deck = parser->parseFile(wconprodFile, ParseMode());
|
||||
DeckPtr deck = parser->parseFile(wconprodFile, ParseContext());
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>( 30,30,30);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(ParseMode() , grid , deck, ioConfig));
|
||||
SchedulePtr sched(new Schedule(ParseContext() , grid , deck, ioConfig));
|
||||
|
||||
BOOST_CHECK_EQUAL(5U, sched->numWells());
|
||||
BOOST_CHECK(sched->hasWell("INJE1"));
|
||||
@@ -75,13 +75,13 @@ BOOST_AUTO_TEST_CASE( parse_WCONPROD_OK ) {
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE( parse_WCONINJE_OK ) {
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
std::string wconprodFile("testdata/integration_tests/WellWithWildcards/WCONINJE1");
|
||||
DeckPtr deck = parser->parseFile(wconprodFile, parseMode);
|
||||
DeckPtr deck = parser->parseFile(wconprodFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>( 30,30,30 );
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(parseMode , grid , deck, ioConfig));
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
|
||||
BOOST_CHECK_EQUAL(5U, sched->numWells());
|
||||
BOOST_CHECK(sched->hasWell("PROD1"));
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#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/Tables/TableManager.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/PlyviscTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/PlymaxTable.hpp>
|
||||
@@ -37,7 +37,7 @@ using namespace Opm;
|
||||
|
||||
BOOST_AUTO_TEST_CASE( parse_polymer_tables ) {
|
||||
ParserPtr parser(new Parser());
|
||||
DeckPtr deck = parser->parseFile("testdata/integration_tests/POLYMER/POLY.inc", ParseMode());
|
||||
DeckPtr deck = parser->parseFile("testdata/integration_tests/POLYMER/POLY.inc", ParseContext());
|
||||
Opm::TableManager tables( *deck );
|
||||
const TableContainer& plymax = tables.getPlymaxTables();
|
||||
const TableContainer& plyrock = tables.getPlyrockTables();
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/parser/eclipse/Deck/Section.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/Parser/ParserKeywords/F.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserKeywords/G.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserKeywords/S.hpp>
|
||||
@@ -37,16 +37,16 @@ using namespace Opm;
|
||||
|
||||
BOOST_AUTO_TEST_CASE( test_parse ) {
|
||||
Parser parser(false);
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
|
||||
parseMode.update( ParseMode::PARSE_UNKNOWN_KEYWORD , InputError::IGNORE );
|
||||
parseMode.update( ParseMode::PARSE_RANDOM_TEXT , InputError::IGNORE );
|
||||
parseMode.update( ParseMode::PARSE_RANDOM_SLASH , InputError::IGNORE );
|
||||
parseContext.update( ParseContext::PARSE_UNKNOWN_KEYWORD , InputError::IGNORE );
|
||||
parseContext.update( ParseContext::PARSE_RANDOM_TEXT , InputError::IGNORE );
|
||||
parseContext.update( ParseContext::PARSE_RANDOM_SLASH , InputError::IGNORE );
|
||||
|
||||
parser.addKeyword<ParserKeywords::SPECGRID>();
|
||||
parser.addKeyword<ParserKeywords::FAULTS>();
|
||||
|
||||
auto deck = parser.parseFile("testdata/integration_tests/Resinsight/DECK1.DATA" , parseMode);
|
||||
auto deck = parser.parseFile("testdata/integration_tests/Resinsight/DECK1.DATA" , parseContext);
|
||||
|
||||
BOOST_CHECK( deck->hasKeyword<ParserKeywords::SPECGRID>() );
|
||||
BOOST_CHECK( deck->hasKeyword<ParserKeywords::FAULTS>() );
|
||||
@@ -55,16 +55,16 @@ BOOST_AUTO_TEST_CASE( test_parse ) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE( test_state ) {
|
||||
Parser parser(false);
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
|
||||
parseMode.update( ParseMode::PARSE_UNKNOWN_KEYWORD , InputError::IGNORE );
|
||||
parseMode.update( ParseMode::PARSE_RANDOM_TEXT , InputError::IGNORE );
|
||||
parseMode.update( ParseMode::PARSE_RANDOM_SLASH , InputError::IGNORE );
|
||||
parseContext.update( ParseContext::PARSE_UNKNOWN_KEYWORD , InputError::IGNORE );
|
||||
parseContext.update( ParseContext::PARSE_RANDOM_TEXT , InputError::IGNORE );
|
||||
parseContext.update( ParseContext::PARSE_RANDOM_SLASH , InputError::IGNORE );
|
||||
|
||||
parser.addKeyword<ParserKeywords::SPECGRID>();
|
||||
parser.addKeyword<ParserKeywords::FAULTS>();
|
||||
parser.addKeyword<ParserKeywords::GRID>();
|
||||
auto deck = parser.parseFile("testdata/integration_tests/Resinsight/DECK1.DATA" , parseMode);
|
||||
auto deck = parser.parseFile("testdata/integration_tests/Resinsight/DECK1.DATA" , parseContext);
|
||||
|
||||
auto grid = std::make_shared<EclipseGrid>( deck );
|
||||
auto gsec = std::make_shared< GRIDSection >( *deck );
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#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/IOConfig/IOConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||
@@ -43,13 +43,13 @@ using namespace Opm;
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(CreateSchedule) {
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE1");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseMode);
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,3);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(parseMode , grid , deck, ioConfig));
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
TimeMapConstPtr timeMap = sched->getTimeMap();
|
||||
BOOST_CHECK_EQUAL(boost::posix_time::ptime(boost::gregorian::date(2007, boost::gregorian::May, 10)), sched->getStartTime());
|
||||
BOOST_CHECK_EQUAL(9U, timeMap->size());
|
||||
@@ -58,13 +58,13 @@ BOOST_AUTO_TEST_CASE(CreateSchedule) {
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(CreateSchedule_Comments_After_Keywords) {
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_COMMENTS_AFTER_KEYWORDS");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseMode);
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,3);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(parseMode , grid , deck, ioConfig));
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
TimeMapConstPtr timeMap = sched->getTimeMap();
|
||||
BOOST_CHECK_EQUAL(boost::posix_time::ptime(boost::gregorian::date(2007, boost::gregorian::May, 10)), sched->getStartTime());
|
||||
BOOST_CHECK_EQUAL(9U, timeMap->size());
|
||||
@@ -72,36 +72,36 @@ BOOST_AUTO_TEST_CASE(CreateSchedule_Comments_After_Keywords) {
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WCONPROD_MissingCmode) {
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_MISSING_CMODE");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseMode);
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,3);
|
||||
IOConfigPtr ioConfig;
|
||||
BOOST_CHECK_NO_THROW( new Schedule(parseMode , grid , deck, ioConfig) );
|
||||
BOOST_CHECK_NO_THROW( new Schedule(parseContext , grid , deck, ioConfig) );
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WCONPROD_Missing_DATA) {
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_CMODE_MISSING_DATA");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseMode);
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,3);
|
||||
IOConfigPtr ioConfig;
|
||||
BOOST_CHECK_THROW( new Schedule(parseMode , grid , deck, ioConfig) , std::invalid_argument );
|
||||
BOOST_CHECK_THROW( new Schedule(parseContext , grid , deck, ioConfig) , std::invalid_argument );
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WellTestRefDepth) {
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseMode);
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(40,60,30);
|
||||
BOOST_CHECK_EQUAL(3, 3);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(parseMode , grid , deck, ioConfig));
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
BOOST_CHECK_EQUAL(4, 4);
|
||||
|
||||
WellPtr well1 = sched->getWell("W_1");
|
||||
@@ -114,13 +114,13 @@ BOOST_AUTO_TEST_CASE(WellTestRefDepth) {
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WellTestOpen) {
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseMode);
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(40,60,30);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(parseMode , grid , deck, ioConfig));
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
|
||||
auto well1 = sched->getWell( "W_1" );
|
||||
auto well2 = sched->getWell( "W_2" );
|
||||
@@ -155,13 +155,13 @@ BOOST_AUTO_TEST_CASE(WellTestOpen) {
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WellTesting) {
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseMode);
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(40,60,30);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(parseMode , grid , deck, ioConfig));
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
|
||||
BOOST_CHECK_EQUAL(4U, sched->numWells());
|
||||
BOOST_CHECK(sched->hasWell("W_1"));
|
||||
@@ -272,24 +272,24 @@ BOOST_AUTO_TEST_CASE(WellTesting) {
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WellTestCOMPDAT_DEFAULTED_ITEMS) {
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_COMPDAT1");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseMode);
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(40,60,30);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(parseMode , grid, deck, ioConfig));
|
||||
SchedulePtr sched(new Schedule(parseContext , grid, deck, ioConfig));
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WellTestCOMPDAT) {
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseMode);
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(40,60,30);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(parseMode , grid , deck, ioConfig));
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
|
||||
BOOST_CHECK_EQUAL(4U, sched->numWells());
|
||||
BOOST_CHECK(sched->hasWell("W_1"));
|
||||
@@ -316,13 +316,13 @@ BOOST_AUTO_TEST_CASE(WellTestCOMPDAT) {
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(GroupTreeTest_GRUPTREE_with_explicit_L0_parenting) {
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_GRUPTREE_EXPLICIT_PARENTING");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseMode);
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,3);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(parseMode , grid , deck, ioConfig));
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
|
||||
GroupTreeNodePtr rootNode = sched->getGroupTree(0)->getNode("FIELD");
|
||||
|
||||
@@ -346,13 +346,13 @@ BOOST_AUTO_TEST_CASE(GroupTreeTest_GRUPTREE_with_explicit_L0_parenting) {
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(GroupTreeTest_GRUPTREE_correct) {
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELSPECS_GRUPTREE");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseMode);
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,3);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr schedule(new Schedule(parseMode , grid , deck, ioConfig));
|
||||
SchedulePtr schedule(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
|
||||
BOOST_CHECK( schedule->hasGroup( "FIELD" ));
|
||||
BOOST_CHECK( schedule->hasGroup( "PROD" ));
|
||||
@@ -366,13 +366,13 @@ BOOST_AUTO_TEST_CASE(GroupTreeTest_GRUPTREE_correct) {
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(GroupTreeTest_WELSPECS_AND_GRUPTREE_correct_iter_function) {
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELSPECS_GROUPS");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseMode);
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,3);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr schedule(new Schedule(parseMode , grid , deck, ioConfig));
|
||||
SchedulePtr schedule(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
|
||||
// Time 0, only from WELSPECS
|
||||
GroupTreeNodeConstPtr root = schedule->getGroupTree(0)->getNode("FIELD");
|
||||
@@ -394,13 +394,13 @@ BOOST_AUTO_TEST_CASE(GroupTreeTest_WELSPECS_AND_GRUPTREE_correct_iter_function)
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(GroupTreeTest_WELSPECS_AND_GRUPTREE_correct_tree) {
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELSPECS_GROUPS");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseMode);
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,3);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr schedule(new Schedule(parseMode , grid , deck, ioConfig));
|
||||
SchedulePtr schedule(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
|
||||
// Time 0, only from WELSPECS
|
||||
GroupTreeNodePtr root0 = schedule->getGroupTree(0)->getNode("FIELD");
|
||||
@@ -440,13 +440,13 @@ BOOST_AUTO_TEST_CASE(GroupTreeTest_WELSPECS_AND_GRUPTREE_correct_tree) {
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(GroupTreeTest_GRUPTREE_WITH_REPARENT_correct_tree) {
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_GROUPS_REPARENT");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseMode);
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,3);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr schedule(new Schedule(parseMode , grid , deck, ioConfig));
|
||||
SchedulePtr schedule(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
|
||||
|
||||
// Time , from first GRUPTREE
|
||||
@@ -474,13 +474,13 @@ BOOST_AUTO_TEST_CASE(GroupTreeTest_GRUPTREE_WITH_REPARENT_correct_tree) {
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(GroupTreeTest_PrintGrouptree) {
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELSPECS_GROUPS");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseMode);
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,3);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(parseMode , grid , deck, ioConfig));
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
|
||||
GroupTreePtr rootNode = sched->getGroupTree(0);
|
||||
rootNode->printTree(std::cout);
|
||||
@@ -489,13 +489,13 @@ BOOST_AUTO_TEST_CASE(GroupTreeTest_PrintGrouptree) {
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE( WellTestGroups ) {
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_GROUPS");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseMode);
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,3);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched( new Schedule(parseMode , grid , deck, ioConfig));
|
||||
SchedulePtr sched( new Schedule(parseContext , grid , deck, ioConfig));
|
||||
|
||||
BOOST_CHECK_EQUAL( 3U , sched->numGroups() );
|
||||
BOOST_CHECK( sched->hasGroup( "INJ" ));
|
||||
@@ -532,13 +532,13 @@ BOOST_AUTO_TEST_CASE( WellTestGroups ) {
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE( WellTestGroupAndWellRelation ) {
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS_AND_GROUPS");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseMode);
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,3);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched( new Schedule(parseMode , grid , deck, ioConfig));
|
||||
SchedulePtr sched( new Schedule(parseContext , grid , deck, ioConfig));
|
||||
|
||||
GroupPtr group1 = sched->getGroup("GROUP1");
|
||||
GroupPtr group2 = sched->getGroup("GROUP2");
|
||||
@@ -562,13 +562,13 @@ BOOST_AUTO_TEST_CASE( WellTestGroupAndWellRelation ) {
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WellTestWELSPECSDataLoaded) {
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseMode);
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(40,60,30);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(parseMode , grid , deck, ioConfig));
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
|
||||
BOOST_CHECK_EQUAL(4U, sched->numWells());
|
||||
BOOST_CHECK(sched->hasWell("W_1"));
|
||||
@@ -596,13 +596,13 @@ BOOST_AUTO_TEST_CASE(WellTestWELSPECSDataLoaded) {
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WellTestWELSPECS_InvalidConfig_Throws) {
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELL_INVALID_WELSPECS");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseMode);
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,3);
|
||||
IOConfigPtr ioConfig;
|
||||
BOOST_CHECK_THROW(new Schedule(parseMode , grid , deck, ioConfig), std::invalid_argument);
|
||||
BOOST_CHECK_THROW(new Schedule(parseContext , grid , deck, ioConfig), std::invalid_argument);
|
||||
|
||||
}
|
||||
|
||||
@@ -636,13 +636,13 @@ BOOST_AUTO_TEST_CASE(WellTestWELOPENControlsSet) {
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WellTestWGRUPCONWellPropertiesSet) {
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WGRUPCON");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseMode);
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>( 10,10,10 );
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(parseMode , grid , deck, ioConfig));
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
|
||||
WellConstPtr well1 = sched->getWell("W_1");
|
||||
BOOST_CHECK(well1->isAvailableForGroupControl(0));
|
||||
@@ -665,7 +665,7 @@ BOOST_AUTO_TEST_CASE(WellTestWGRUPCONWellPropertiesSet) {
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(TestDefaultedCOMPDATIJ) {
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
const char * deckString = "\n\
|
||||
START\n\
|
||||
@@ -679,10 +679,10 @@ WELSPECS \n\
|
||||
COMPDAT \n\
|
||||
'W1' 2* 1 1 'OPEN' 1* 32.948 0.311 3047.839 2* 'X' 22.100 /\n\
|
||||
/\n";
|
||||
DeckPtr deck = parser->parseString(deckString, parseMode);
|
||||
DeckPtr deck = parser->parseString(deckString, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>( 30,30,10 );
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(parseMode , grid , deck, ioConfig));
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
WellConstPtr well = sched->getWell("W1");
|
||||
CompletionSetConstPtr completions = well->getCompletions(0);
|
||||
BOOST_CHECK_EQUAL( 10 , completions->get(0)->getI() );
|
||||
@@ -695,25 +695,25 @@ COMPDAT \n\
|
||||
certain we can parse it.
|
||||
*/
|
||||
BOOST_AUTO_TEST_CASE(OpmCode) {
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/wells_group.data");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseMode);
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,3);
|
||||
IOConfigPtr ioConfig;
|
||||
BOOST_CHECK_NO_THROW( new Schedule(parseMode , grid , deck, ioConfig) );
|
||||
BOOST_CHECK_NO_THROW( new Schedule(parseContext , grid , deck, ioConfig) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WELLS_SHUT) {
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_SHUT_WELL");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseMode);
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>( 20,40,1 );
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(parseMode , grid , deck, ioConfig));
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
|
||||
|
||||
WellConstPtr well1 = sched->getWell("W1");
|
||||
@@ -732,13 +732,13 @@ BOOST_AUTO_TEST_CASE(WELLS_SHUT) {
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WellTestWPOLYMER) {
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_POLYMER");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseMode);
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>( 30,30,30);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(parseMode , grid , deck, ioConfig));
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
|
||||
|
||||
BOOST_CHECK_EQUAL(4U, sched->numWells());
|
||||
@@ -781,14 +781,14 @@ BOOST_AUTO_TEST_CASE(WellTestWPOLYMER) {
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(TestEvents) {
|
||||
ParseMode parseMode;
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_EVENTS");
|
||||
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseMode);
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(40,40,30);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(parseMode , grid , deck, ioConfig));
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
const Events& events = sched->getEvents();
|
||||
|
||||
BOOST_CHECK_EQUAL( true , events.hasEvent(ScheduleEvents::NEW_WELL , 0 ) );
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#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/EclipseState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/TransMult.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||
@@ -41,9 +41,9 @@ using namespace Opm;
|
||||
BOOST_AUTO_TEST_CASE(MULTFLT_IN_SCHEDULE) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/TRANS/Deck1");
|
||||
ParseMode parseMode;
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseMode);
|
||||
std::shared_ptr<EclipseState> eclState = std::make_shared<EclipseState>( deck , parseMode );
|
||||
ParseContext parseContext;
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<EclipseState> eclState = std::make_shared<EclipseState>( deck , parseContext );
|
||||
std::shared_ptr<const TransMult> trans = eclState->getTransMult();
|
||||
std::shared_ptr<const Schedule> schedule = eclState->getSchedule();
|
||||
const Events& events = schedule->getEvents();
|
||||
|
||||
Reference in New Issue
Block a user