diff --git a/ebos/eclbasevanguard.hh b/ebos/eclbasevanguard.hh index 2a7a4400f..e5fc36e13 100644 --- a/ebos/eclbasevanguard.hh +++ b/ebos/eclbasevanguard.hh @@ -35,6 +35,7 @@ #include #include +#include #include #include #include @@ -348,7 +349,7 @@ public: // create the schedule object. Note that if eclState is supposed to represent // the internalized version of the deck, this constitutes a layering // violation. - internalEclSchedule_.reset(new Opm::Schedule(*deck_, *eclState_, *parseContext_, *errorGuard_)); + internalEclSchedule_.reset(new Opm::Schedule(*deck_, *eclState_, *parseContext_, *errorGuard_, python)); eclSchedule_ = internalEclSchedule_.get(); } else @@ -629,6 +630,7 @@ private: Opm::EclipseState* eclState_; Opm::Schedule* eclSchedule_; Opm::SummaryConfig* eclSummaryConfig_; + Opm::Python python; Dune::EdgeWeightMethod edgeWeightsMethod_; bool ownersFirst_; diff --git a/flow/flow.cpp b/flow/flow.cpp index 7117069f1..6ef663612 100644 --- a/flow/flow.cpp +++ b/flow/flow.cpp @@ -326,6 +326,7 @@ int main(int argc, char** argv) std::cout << "Reading deck file '" << deckFilename << "'\n"; std::cout.flush(); } + Opm::Python python; std::shared_ptr deck; std::shared_ptr eclipseState; std::shared_ptr schedule; @@ -371,9 +372,9 @@ int main(int argc, char** argv) const auto& rst_filename = eclipseState->getIOConfig().getRestartFileName( init_config.getRestartRootName(), report_step, false ); Opm::EclIO::ERst rst_file(rst_filename); const auto& rst_state = Opm::RestartIO::RstState::load(rst_file, report_step); - schedule.reset(new Opm::Schedule(*deck, *eclipseState, parseContext, errorGuard, &rst_state) ); + schedule.reset(new Opm::Schedule(*deck, *eclipseState, parseContext, errorGuard, python, &rst_state) ); } else - schedule.reset(new Opm::Schedule(*deck, *eclipseState, parseContext, errorGuard)); + schedule.reset(new Opm::Schedule(*deck, *eclipseState, parseContext, errorGuard, python)); setupMessageLimiter(schedule->getMessageLimits(), "STDOUT_LOGGER"); summaryConfig.reset( new Opm::SummaryConfig(*deck, *schedule, eclipseState->getTableManager(), parseContext, errorGuard)); diff --git a/flow/flow_tag.hpp b/flow/flow_tag.hpp index 570519b10..5d78a7545 100644 --- a/flow/flow_tag.hpp +++ b/flow/flow_tag.hpp @@ -33,6 +33,7 @@ #include #include +#include #include #include #include @@ -354,6 +355,7 @@ int mainFlow(int argc, char** argv) std::cout << "Reading deck file '" << deckFilename << "'\n"; std::cout.flush(); } + Opm::Python python; std::shared_ptr deck; std::shared_ptr eclipseState; std::shared_ptr schedule; @@ -390,7 +392,7 @@ int mainFlow(int argc, char** argv) #else eclipseState.reset(new Opm::EclipseState(*deck)); #endif - schedule.reset(new Opm::Schedule(*deck, *eclipseState, parseContext, errorGuard)); + schedule.reset(new Opm::Schedule(*deck, *eclipseState, parseContext, errorGuard, python)); setupMessageLimiter(schedule->getMessageLimits(), "STDOUT_LOGGER"); summaryConfig.reset( new Opm::SummaryConfig(*deck, *schedule, eclipseState->getTableManager(), parseContext, errorGuard)); } diff --git a/tests/test_norne_pvt.cpp b/tests/test_norne_pvt.cpp index 2ec48312a..725b28155 100644 --- a/tests/test_norne_pvt.cpp +++ b/tests/test_norne_pvt.cpp @@ -29,6 +29,7 @@ #include #include +#include #include #include #include @@ -276,11 +277,12 @@ BOOST_AUTO_TEST_CASE( Test_Norne_PVT) { Opm::ParseContext parseContext({{ ParseContext::PARSE_RANDOM_SLASH , InputError::IGNORE }}); Opm::ErrorGuard errorGuard; Opm::Parser parser; + Opm::Python python; auto deck = parser.parseFile("norne_pvt.data", parseContext, errorGuard); Opm::EclipseState eclState(deck); - Opm::Schedule schedule(deck, eclState); + Opm::Schedule schedule(deck, eclState, python); verify_norne_oil_pvt_region1(eclState, schedule); verify_norne_oil_pvt_region2(eclState, schedule); diff --git a/tests/test_stoppedwells.cpp b/tests/test_stoppedwells.cpp index 45e3c5d8f..367cbeefb 100644 --- a/tests/test_stoppedwells.cpp +++ b/tests/test_stoppedwells.cpp @@ -24,6 +24,7 @@ #include +#include #include #include @@ -36,7 +37,8 @@ BOOST_AUTO_TEST_CASE(TestStoppedWells) Opm::Parser parser; Opm::Deck deck(parser.parseFile(filename)); Opm::EclipseState eclipseState(deck); - const Schedule sched(deck, eclipseState); + Opm::Python python; + const Schedule sched(deck, eclipseState, python); // Both wells are open in the first schedule step { diff --git a/tests/test_wellmodel.cpp b/tests/test_wellmodel.cpp index b5688a285..be1a83206 100644 --- a/tests/test_wellmodel.cpp +++ b/tests/test_wellmodel.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -70,12 +71,13 @@ struct SetupTest { { const Opm::TableManager table ( deck ); const Opm::Runspec runspec (deck); - schedule.reset( new Opm::Schedule(deck, *ecl_state)); + schedule.reset( new Opm::Schedule(deck, *ecl_state, python)); summaryState.reset( new Opm::SummaryState(std::chrono::system_clock::from_time_t(schedule->getStartTime()))); } current_timestep = 0; }; + Opm::Python python; std::unique_ptr ecl_state; std::unique_ptr schedule; std::unique_ptr summaryState; diff --git a/tests/test_wellstatefullyimplicitblackoil.cpp b/tests/test_wellstatefullyimplicitblackoil.cpp index e8e1c21e7..639eb1591 100644 --- a/tests/test_wellstatefullyimplicitblackoil.cpp +++ b/tests/test_wellstatefullyimplicitblackoil.cpp @@ -22,6 +22,7 @@ #define BOOST_TEST_MODULE WellStateFIBOTest #include +#include #include @@ -51,7 +52,7 @@ struct Setup : es (deck) , pu (Opm::phaseUsageFromDeck(es)) , grid (es.getInputGrid()) - , sched(deck, es) + , sched(deck, es, python) , st(std::chrono::system_clock::from_time_t(sched.getStartTime())) { initWellPerfData(); @@ -101,6 +102,7 @@ struct Setup } } + Opm::Python python; Opm::EclipseState es; Opm::PhaseUsage pu; Opm::GridManager grid;