diff --git a/opm/output/eclipse/AggregateWellData.hpp b/opm/output/eclipse/AggregateWellData.hpp index 131e18212..f9590981f 100644 --- a/opm/output/eclipse/AggregateWellData.hpp +++ b/opm/output/eclipse/AggregateWellData.hpp @@ -33,6 +33,7 @@ namespace Opm { class Schedule; class SummaryState; class UnitSystem; + class WellTestState; namespace Action { class State; } @@ -49,12 +50,13 @@ namespace Opm { namespace RestartIO { namespace Helpers { public: explicit AggregateWellData(const std::vector& inteHead); - void captureDeclaredWellData(const Schedule& sched, - const UnitSystem& units, - const std::size_t sim_step, - const ::Opm::Action::State& action_state, - const ::Opm::SummaryState& smry, - const std::vector& inteHead); + void captureDeclaredWellData(const Schedule& sched, + const UnitSystem& units, + const std::size_t sim_step, + const Opm::Action::State& action_state, + const Opm::WellTestState& wtest_state, + const Opm::SummaryState& smry, + const std::vector& inteHead); void captureDynamicWellData(const Opm::Schedule& sched, const std::size_t sim_step, diff --git a/src/opm/output/eclipse/AggregateWellData.cpp b/src/opm/output/eclipse/AggregateWellData.cpp index 337d78a19..4a09805b8 100644 --- a/src/opm/output/eclipse/AggregateWellData.cpp +++ b/src/opm/output/eclipse/AggregateWellData.cpp @@ -38,6 +38,8 @@ #include #include #include +#include +#include #include #include @@ -970,6 +972,7 @@ captureDeclaredWellData(const Schedule& sched, const UnitSystem& units, const std::size_t sim_step, const ::Opm::Action::State& action_state, + const Opm::WellTestState& wtest_state, const ::Opm::SummaryState& smry, const std::vector& inteHead) { diff --git a/src/opm/output/eclipse/RestartIO.cpp b/src/opm/output/eclipse/RestartIO.cpp index 95cd4818d..5682fdf4a 100644 --- a/src/opm/output/eclipse/RestartIO.cpp +++ b/src/opm/output/eclipse/RestartIO.cpp @@ -383,14 +383,14 @@ namespace { const std::vector& well_names, const data::Wells& wells, const Opm::Action::State& action_state, + const Opm::WellTestState& wtest_state, const Opm::SummaryState& sumState, const std::vector& ih, EclIO::OutputStream::Restart& rstFile) { auto wellData = Helpers::AggregateWellData(ih); - wellData.captureDeclaredWellData(schedule, units, sim_step, action_state, sumState, ih); - wellData.captureDynamicWellData(schedule, sim_step, - wells, sumState); + wellData.captureDeclaredWellData(schedule, units, sim_step, action_state, wtest_state, sumState, ih); + wellData.captureDynamicWellData(schedule, sim_step, wells, sumState); rstFile.write("IWEL", wellData.getIWell()); rstFile.write("SWEL", wellData.getSWell()); @@ -482,6 +482,7 @@ namespace { const Schedule& schedule, const data::Wells& wellSol, const Opm::Action::State& action_state, + const Opm::WellTestState& wtest_state, const Opm::SummaryState& sumState, const std::vector& inteHD, const data::Aquifers& aquDynData, @@ -514,7 +515,7 @@ namespace { } writeWell(sim_step, ecl_compatible_rst, phases, units, grid, schedule, - wells, wellSol, action_state, sumState, inteHD, rstFile); + wells, wellSol, action_state, wtest_state, sumState, inteHD, rstFile); } if ((es.aquifer().hasAnalyticalAquifer() || es.aquifer().hasNumericalAquifer()) && @@ -757,7 +758,7 @@ void save(EclIO::OutputStream::Restart& rstFile, const EclipseGrid& grid, const Schedule& schedule, const Action::State& action_state, - const WellTestState& , + const WellTestState& wtest_state, const SummaryState& sumState, const UDQState& udqState, std::optional& aquiferData, @@ -784,7 +785,7 @@ void save(EclIO::OutputStream::Restart& rstFile, if (report_step > 0) { writeDynamicData(sim_step, ecl_compatible_rst, es.runspec().phases(), - units, grid, es, schedule, value.wells, action_state, + units, grid, es, schedule, value.wells, action_state, wtest_state, sumState, inteHD, value.aquifer, aquiferData, rstFile); } diff --git a/tests/test_AggregateActionxData.cpp b/tests/test_AggregateActionxData.cpp index 12a7d7cbf..7913558a5 100644 --- a/tests/test_AggregateActionxData.cpp +++ b/tests/test_AggregateActionxData.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -197,7 +198,7 @@ BOOST_AUTO_TEST_CASE(Declared_Actionx_data) } { auto well_aggregator = Opm::RestartIO::Helpers::AggregateWellData(ih); - well_aggregator.captureDeclaredWellData(sched, es.getUnits(), rptStep, Opm::Action::State {}, st, ih); + well_aggregator.captureDeclaredWellData(sched, es.getUnits(), rptStep, {}, {}, st, ih); rstFile.write("IWEL", well_aggregator.getIWell()); rstFile.write("SWEL", well_aggregator.getSWell()); rstFile.write("XWEL", well_aggregator.getXWell()); diff --git a/tests/test_AggregateUDQData.cpp b/tests/test_AggregateUDQData.cpp index 20c81e37f..b9f41ae5e 100644 --- a/tests/test_AggregateUDQData.cpp +++ b/tests/test_AggregateUDQData.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -256,8 +257,9 @@ BOOST_AUTO_TEST_CASE (Declared_UDQ_data) } { auto action_state = Opm::Action::State {}; + auto wtest_state = Opm::WellTestState{}; auto well_aggregator = Opm::RestartIO::Helpers::AggregateWellData(ih); - well_aggregator.captureDeclaredWellData(sched, es.getUnits(), rptStep, action_state, st, ih); + well_aggregator.captureDeclaredWellData(sched, es.getUnits(), rptStep, action_state, wtest_state, st, ih); rstFile.write("IWEL", well_aggregator.getIWell()); rstFile.write("SWEL", well_aggregator.getSWell()); rstFile.write("XWEL", well_aggregator.getXWell()); diff --git a/tests/test_AggregateWellData.cpp b/tests/test_AggregateWellData.cpp index 23952f515..8d968dd35 100644 --- a/tests/test_AggregateWellData.cpp +++ b/tests/test_AggregateWellData.cpp @@ -43,6 +43,8 @@ #include #include #include +#include +#include #include #include @@ -596,6 +598,7 @@ BOOST_AUTO_TEST_CASE (Declared_Well_Data) { const auto simCase = SimulationCase{first_sim()}; Opm::Action::State action_state; + Opm::WellTestState wtest_state; // Report Step 1: 2008-10-10 --> 2011-01-20 const auto rptStep = std::size_t{1}; @@ -608,7 +611,7 @@ BOOST_AUTO_TEST_CASE (Declared_Well_Data) const auto smry = sim_state(); auto awd = Opm::RestartIO::Helpers::AggregateWellData{ih.value}; awd.captureDeclaredWellData(simCase.sched, - simCase.es.getUnits(), rptStep, action_state, smry, ih.value); + simCase.es.getUnits(), rptStep, action_state, wtest_state, smry, ih.value); // IWEL (OP_1) { @@ -753,7 +756,7 @@ BOOST_AUTO_TEST_CASE (Declared_Well_Data) //smry = sim_state(); awd = Opm::RestartIO::Helpers::AggregateWellData{ih_8.value}; awd.captureDeclaredWellData(simCase.sched, - simCase.es.getUnits(), rptStep_8, action_state, smry, ih_8.value); + simCase.es.getUnits(), rptStep_8, action_state, wtest_state, smry, ih_8.value); { using Ix = ::Opm::RestartIO::Helpers::VectorItems::SWell::index; @@ -779,6 +782,7 @@ BOOST_AUTO_TEST_CASE (Declared_Well_Data_MSW_well_data) Opm::EclipseState es = simCase.es; Opm::Schedule sched = simCase.sched; Opm::Action::State action_state; + Opm::WellTestState wtest_state; const auto rptStep = std::size_t{1}; const auto ih = MockIH { @@ -788,7 +792,7 @@ BOOST_AUTO_TEST_CASE (Declared_Well_Data_MSW_well_data) auto awd = Opm::RestartIO::Helpers::AggregateWellData{ih.value}; awd.captureDeclaredWellData(simCase.sched, - simCase.es.getUnits(), rptStep, action_state, smry, ih.value); + simCase.es.getUnits(), rptStep, action_state, wtest_state, smry, ih.value); // IWEL (PROD1) { @@ -848,6 +852,7 @@ BOOST_AUTO_TEST_CASE (Dynamic_Well_Data_Step1) const auto xw = well_rates_1(); const auto smry = sim_state(); auto awd = Opm::RestartIO::Helpers::AggregateWellData{ih.value}; + Opm::WellTestState wtest_state; awd.captureDynamicWellData(simCase.sched, rptStep, xw, smry); @@ -991,6 +996,7 @@ BOOST_AUTO_TEST_CASE (Dynamic_Well_Data_Step2) const auto xw = well_rates_2(); const auto smry = sim_state(); auto awd = Opm::RestartIO::Helpers::AggregateWellData{ih.value}; + Opm::WellTestState wtest_state; awd.captureDynamicWellData(simCase.sched, rptStep, xw, smry); @@ -1172,6 +1178,7 @@ BOOST_AUTO_TEST_CASE(WELL_POD) { const auto rptStep = std::size_t{2}; const auto sim_step = rptStep - 1; Opm::SummaryState sumState(Opm::TimeService::now()); + Opm::WellTestState wtest_state; const auto xw = well_rates_1(); Opm::Action::State action_state; @@ -1184,7 +1191,7 @@ BOOST_AUTO_TEST_CASE(WELL_POD) { sim_step); auto wellData = Opm::RestartIO::Helpers::AggregateWellData(ih); - wellData.captureDeclaredWellData(simCase.sched, units, sim_step, action_state, sumState, ih); + wellData.captureDeclaredWellData(simCase.sched, units, sim_step, action_state, wtest_state, sumState, ih); wellData.captureDynamicWellData(simCase.sched, sim_step, xw , sumState); auto connectionData = Opm::RestartIO::Helpers::AggregateConnectionData(ih); diff --git a/tests/test_LGOData.cpp b/tests/test_LGOData.cpp index 0e594acb2..feee1d4a9 100644 --- a/tests/test_LGOData.cpp +++ b/tests/test_LGOData.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -98,7 +99,7 @@ BOOST_AUTO_TEST_CASE(liftGasOptimzation_data) const auto dh = Opm::RestartIO::Helpers::createDoubHead(es, sched, simStep, secs_elapsed, next_step_size); auto wellData = Opm::RestartIO::Helpers::AggregateWellData(ih); - wellData.captureDeclaredWellData(sched, es.getUnits(), simStep, action_state, st, ih); + wellData.captureDeclaredWellData(sched, es.getUnits(), simStep, action_state, {}, st, ih); // intehead data auto eachnc = Opm::RestartIO::Helpers::VectorItems::intehead::EACHNCITS; diff --git a/tests/test_rst.cpp b/tests/test_rst.cpp index a540da1e8..c57295f2a 100644 --- a/tests/test_rst.cpp +++ b/tests/test_rst.cpp @@ -44,6 +44,7 @@ #include #include #include +#include #include @@ -270,6 +271,7 @@ BOOST_AUTO_TEST_CASE(State_test) { const auto sim_step = rptStep - 1; Opm::SummaryState sumState(Opm::TimeService::now()); Opm::Action::State action_state; + Opm::WellTestState wtest_state; const auto ih = Opm::RestartIO::Helpers::createInteHead(simCase.es, simCase.grid, @@ -287,7 +289,7 @@ BOOST_AUTO_TEST_CASE(State_test) { 0, 0); auto wellData = Opm::RestartIO::Helpers::AggregateWellData(ih); - wellData.captureDeclaredWellData(simCase.sched, units, sim_step, action_state, sumState, ih); + wellData.captureDeclaredWellData(simCase.sched, units, sim_step, action_state, wtest_state, sumState, ih); wellData.captureDynamicWellData(simCase.sched, sim_step, {} , sumState); auto connectionData = Opm::RestartIO::Helpers::AggregateConnectionData(ih);