diff --git a/python/cxx/eclipse_config.cpp b/python/cxx/eclipse_config.cpp index 9d07d67f2..467badd4c 100644 --- a/python/cxx/eclipse_config.cpp +++ b/python/cxx/eclipse_config.cpp @@ -18,7 +18,7 @@ void python::common::export_EclipseConfig(py::module& module) py::class_< SummaryConfig >( module, "SummaryConfig") .def(py::init([](const Deck& deck, const EclipseState& state, const Schedule& schedule) { - return SummaryConfig( deck, schedule, state.getTableManager() ); + return SummaryConfig( deck, schedule, state.getTableManager(), state.aquifer() ); } ) ) .def( "__contains__", &SummaryConfig::hasKeyword ); diff --git a/src/opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.cpp b/src/opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.cpp index c8d16d0cd..c75f628da 100644 --- a/src/opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.cpp +++ b/src/opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.cpp @@ -265,11 +265,6 @@ namespace { return false; } - bool is_aquifer(const std::string& keyword) - { - return (keyword[0] == 'A') && (keyword != "ALL"); - } - bool is_node_keyword(const std::string& keyword) { static const auto nodekw = keyword_set { @@ -360,10 +355,10 @@ inline void keywordW( SummaryConfig::keyword_list& list, // maybe loc will be needed inline void keywordAquifer( SummaryConfig::keyword_list& list, const AquiferConfig& aquiferConfig, - const ParseContext& parseContext, - ErrorGuard& errors, + const ParseContext& /* parseContext */, + ErrorGuard& /* errors */, const DeckKeyword& keyword, - const Schedule& schedule) { + const Schedule& /* schedule */) { auto param = SummaryConfigNode { keyword.name(), SummaryConfigNode::Category::Aquifer, keyword.location() } @@ -955,20 +950,13 @@ inline void handleKW( SummaryConfig::keyword_list& list, const std::string& keyword, const KeywordLocation& location, const Schedule& schedule, - const ParseContext& parseContext, - ErrorGuard& errors) { + const ParseContext& /* parseContext */, + ErrorGuard& /* errors */) { if (is_udq(keyword)) throw std::logic_error("UDQ keywords not handleded when expanding alias list"); -/* if (is_aquifer(keyword)) { - std::string msg = "Summary output keyword {keyword} of type AQUIFER is not supported\n" - "In {{file}} line {{line}}"; - parseContext.handleError(ParseContext::SUMMARY_UNHANDLED_KEYWORD, msg, location, errors); - return; - } */ - using Cat = SummaryConfigNode::Category; const auto cat = parseKeywordCategory( keyword ); diff --git a/tests/msim/test_msim.cpp b/tests/msim/test_msim.cpp index ccf063e12..ed70a6a1b 100644 --- a/tests/msim/test_msim.cpp +++ b/tests/msim/test_msim.cpp @@ -80,7 +80,7 @@ BOOST_AUTO_TEST_CASE(RUN) { Deck deck = parser.parseFile("SPE1CASE1.DATA"); EclipseState state(deck); Schedule schedule(deck, state, python); - SummaryConfig summary_config(deck, schedule, state.getTableManager()); + SummaryConfig summary_config(deck, schedule, state.getTableManager(), state.aquifer()); msim msim(state); msim.well_rate("PROD", data::Rates::opt::oil, prod_opr); diff --git a/tests/msim/test_msim_ACTIONX.cpp b/tests/msim/test_msim_ACTIONX.cpp index 8848cdaab..3f530708a 100644 --- a/tests/msim/test_msim_ACTIONX.cpp +++ b/tests/msim/test_msim_ACTIONX.cpp @@ -63,7 +63,7 @@ struct test_data { state( this->deck ), python( std::make_shared() ), schedule( this->deck, this->state, this->python), - summary_config( this->deck, this->schedule, this->state.getTableManager()) + summary_config( this->deck, this->schedule, this->state.getTableManager(), this->state.aquifer() ) { auto& ioconfig = this->state.getIOConfig(); ioconfig.setBaseName("MSIM"); diff --git a/tests/msim/test_msim_EXIT.cpp b/tests/msim/test_msim_EXIT.cpp index 66883a960..1c090b76e 100644 --- a/tests/msim/test_msim_EXIT.cpp +++ b/tests/msim/test_msim_EXIT.cpp @@ -84,7 +84,7 @@ BOOST_AUTO_TEST_CASE(MSIM_EXIT_TEST) { Opm::Deck deck = parser.parseFile(deck_file); Opm::EclipseState state(deck); Opm::Schedule schedule(deck, state, python); - Opm::SummaryConfig summary_config(deck, schedule, state.getTableManager()); + Opm::SummaryConfig summary_config(deck, schedule, state.getTableManager(), state.aquifer()); { WorkArea work_area("test_msim"); diff --git a/tests/parser/SummaryConfigTests.cpp b/tests/parser/SummaryConfigTests.cpp index e6408fbb5..bafd2003c 100644 --- a/tests/parser/SummaryConfigTests.cpp +++ b/tests/parser/SummaryConfigTests.cpp @@ -156,7 +156,7 @@ static SummaryConfig createSummary( std::string input , const ParseContext& pars auto python = std::make_shared(); EclipseState state( deck ); Schedule schedule(deck, state, parseContext, errors, python); - return SummaryConfig(deck, schedule, state.getTableManager(), <#initializer#>, parseContext, errors); + return SummaryConfig(deck, schedule, state.getTableManager(), state.aquifer(), parseContext, errors); } BOOST_AUTO_TEST_CASE(wells_all) { @@ -176,7 +176,7 @@ BOOST_AUTO_TEST_CASE(EMPTY) { auto python = std::make_shared(); EclipseState state( deck ); Schedule schedule(deck, state, python); - SummaryConfig conf(deck, schedule, state.getTableManager()); + SummaryConfig conf(deck, schedule, state.getTableManager(), state.aquifer()); BOOST_CHECK_EQUAL( conf.size(), 0U ); } @@ -189,7 +189,7 @@ BOOST_AUTO_TEST_CASE(wells_missingI) { parseContext.update(ParseContext::SUMMARY_UNKNOWN_WELL, InputError::THROW_EXCEPTION); EclipseState state( deck ); Schedule schedule(deck, state, parseContext, errors, python ); - BOOST_CHECK_NO_THROW(SummaryConfig(deck, schedule, state.getTableManager(), <#initializer#>, parseContext, errors)); + BOOST_CHECK_NO_THROW(SummaryConfig(deck, schedule, state.getTableManager(), state.aquifer(), parseContext, errors)); } @@ -733,7 +733,7 @@ BOOST_AUTO_TEST_CASE(Summary_Segment) const auto schedule = Schedule { deck, state, python}; const auto summary = SummaryConfig { - deck, schedule, state.getTableManager() + deck, schedule, state.getTableManager(), state.aquifer() }; // SOFR PROD01 segments 1, 10, 21. @@ -1077,7 +1077,7 @@ END const auto parseContext = ParseContext{}; const auto state = EclipseState (deck); const auto schedule = Schedule (deck, state, parseContext, errors, std::make_shared()); - const auto smry = SummaryConfig(deck, schedule, state.getTableManager(), <#initializer#>, parseContext, errors); + const auto smry = SummaryConfig(deck, schedule, state.getTableManager(), state.aquifer(), parseContext, errors); BOOST_CHECK_MESSAGE(deck.hasKeyword("GPR"), R"(Deck must have "GPR" keyword)"); BOOST_CHECK_MESSAGE(smry.hasKeyword("GPR"), R"(SummaryConfig must have "GPR" keyword)"); diff --git a/tests/parser/integration/parse_write.cpp b/tests/parser/integration/parse_write.cpp index 7d5c4de63..5889b9282 100644 --- a/tests/parser/integration/parse_write.cpp +++ b/tests/parser/integration/parse_write.cpp @@ -34,7 +34,7 @@ inline void loadDeck( const char * deck_file) { auto deck = parser.parseFile(deck_file); Opm::EclipseState state( deck); Opm::Schedule schedule( deck, state, python); - Opm::SummaryConfig summary( deck, schedule, state.getTableManager( )); + Opm::SummaryConfig summary( deck, schedule, state.getTableManager( ), state.aquifer() ); { std::stringstream ss; diff --git a/tests/test_EclipseIO.cpp b/tests/test_EclipseIO.cpp index b56f33b41..d8f9afcc5 100644 --- a/tests/test_EclipseIO.cpp +++ b/tests/test_EclipseIO.cpp @@ -285,7 +285,7 @@ BOOST_AUTO_TEST_CASE(EclipseIOIntegration) { auto& eclGrid = es.getInputGrid(); auto python = std::make_shared(); Schedule schedule(deck, es, python); - SummaryConfig summary_config( deck, schedule, es.getTableManager( )); + SummaryConfig summary_config( deck, schedule, es.getTableManager( ), es.aquifer()); SummaryState st(std::chrono::system_clock::now()); es.getIOConfig().setBaseName( "FOO" ); diff --git a/tests/test_RFT.cpp b/tests/test_RFT.cpp index 4c99d7374..daea4da47 100644 --- a/tests/test_RFT.cpp +++ b/tests/test_RFT.cpp @@ -269,7 +269,7 @@ BOOST_AUTO_TEST_CASE(test_RFT) const auto numCells = grid.getCartesianSize( ); const Schedule schedule(deck, eclipseState, python); - const SummaryConfig summary_config( deck, schedule, eclipseState.getTableManager( )); + const SummaryConfig summary_config( deck, schedule, eclipseState.getTableManager( ), eclipseState.aquifer() ); EclipseIO eclipseWriter( eclipseState, grid, schedule, summary_config ); @@ -396,7 +396,7 @@ BOOST_AUTO_TEST_CASE(test_RFT2) const auto numCells = grid.getCartesianSize( ); Schedule schedule(deck, eclipseState, python); - SummaryConfig summary_config( deck, schedule, eclipseState.getTableManager( )); + SummaryConfig summary_config( deck, schedule, eclipseState.getTableManager( ), eclipseState.aquifer() ); SummaryState st(std::chrono::system_clock::now()); Action::State action_state; UDQState udq_state(10); diff --git a/tests/test_Restart.cpp b/tests/test_Restart.cpp index 240f11505..6d7e72e19 100644 --- a/tests/test_Restart.cpp +++ b/tests/test_Restart.cpp @@ -360,7 +360,7 @@ struct Setup { grid( es.getInputGrid( ) ), python( std::make_shared() ), schedule( deck, es, python ), - summary_config( deck, schedule, es.getTableManager( )) + summary_config( deck, schedule, es.getTableManager( ), es.aquifer() ) { auto& io_config = es.getIOConfig(); io_config.setEclCompatibleRST(false); diff --git a/tests/test_Summary.cpp b/tests/test_Summary.cpp index faae9848e..f8d5ae833 100755 --- a/tests/test_Summary.cpp +++ b/tests/test_Summary.cpp @@ -435,7 +435,7 @@ struct setup { grid( es.getInputGrid() ), python( std::make_shared() ), schedule( deck, es, python), - config( deck, schedule, es.getTableManager()), + config( deck, schedule, es.getTableManager(), es.aquifer()), wells( result_wells(w3_injector) ), grp_nwrk( result_group_nwrk() ), name( toupper(std::move(fname)) ), diff --git a/tests/test_Summary_Group.cpp b/tests/test_Summary_Group.cpp index 9a994fd2d..84f10307f 100644 --- a/tests/test_Summary_Group.cpp +++ b/tests/test_Summary_Group.cpp @@ -231,7 +231,7 @@ struct setup { grid( es.getInputGrid() ), python( std::make_shared() ), schedule( deck, es, python), - config( deck, schedule, es.getTableManager()), + config( deck, schedule, es.getTableManager(), es.aquifer() ), wells( result_wells() ), grp_nwrk( result_group_network() ), name( toupper(std::move(fname)) ), diff --git a/tests/test_restartwellinfo.cpp b/tests/test_restartwellinfo.cpp index a9ce3ffc9..dfcad9467 100644 --- a/tests/test_restartwellinfo.cpp +++ b/tests/test_restartwellinfo.cpp @@ -203,7 +203,7 @@ BOOST_AUTO_TEST_CASE(EclipseWriteRestartWellInfo) { Opm::EclipseState es(deck); const Opm::EclipseGrid& grid = es.getInputGrid(); Opm::Schedule schedule( deck, es, python); - Opm::SummaryConfig summary_config( deck, schedule, es.getTableManager( )); + Opm::SummaryConfig summary_config( deck, schedule, es.getTableManager( ), es.aquifer()); const auto num_cells = grid.getCartesianSize(); Opm::EclipseIO eclipseWriter( es, grid , schedule, summary_config); int countTimeStep = schedule.getTimeMap().numTimesteps();