From dcd5fc76a0cfad1687023d2201f491e9b5b7ba8c Mon Sep 17 00:00:00 2001 From: Joakim Hove Date: Sat, 2 Oct 2021 21:05:16 +0200 Subject: [PATCH] Add WellTestState argument when calling IO routines --- ebos/eclgenericwriter.cc | 9 ++++++++- ebos/eclgenericwriter.hh | 1 + ebos/eclwriter.hh | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ebos/eclgenericwriter.cc b/ebos/eclgenericwriter.cc index 06abb4c04..c1a18483f 100644 --- a/ebos/eclgenericwriter.cc +++ b/ebos/eclgenericwriter.cc @@ -106,6 +106,7 @@ bool directVerticalNeighbors(const std::array& cartDims, struct EclWriteTasklet : public Opm::TaskletInterface { Opm::Action::State actionState_; + Opm::WellTestState wtestState_; Opm::SummaryState summaryState_; Opm::UDQState udqState_; Opm::EclipseIO& eclIO_; @@ -116,6 +117,7 @@ struct EclWriteTasklet : public Opm::TaskletInterface bool writeDoublePrecision_; explicit EclWriteTasklet(const Opm::Action::State& actionState, + const Opm::WellTestState& wtestState, const Opm::SummaryState& summaryState, const Opm::UDQState& udqState, Opm::EclipseIO& eclIO, @@ -125,6 +127,7 @@ struct EclWriteTasklet : public Opm::TaskletInterface Opm::RestartValue restartValue, bool writeDoublePrecision) : actionState_(actionState) + , wtestState_(wtestState) , summaryState_(summaryState) , udqState_(udqState) , eclIO_(eclIO) @@ -139,6 +142,7 @@ struct EclWriteTasklet : public Opm::TaskletInterface void run() { eclIO_.writeTimeStep(actionState_, + wtestState_, summaryState_, udqState_, reportStepNum_, @@ -392,6 +396,7 @@ doWriteOutput(const int reportStepNum, data::Wells&& localWellData, data::GroupAndNetworkValues&& localGroupAndNetworkData, data::Aquifers&& localAquiferData, + WellTestState&& localWTestState, const Action::State& actionState, const UDQState& udqState, const SummaryState& summaryState, @@ -429,7 +434,9 @@ doWriteOutput(const int reportStepNum, // first, create a tasklet to write the data for the current time // step to disk auto eclWriteTasklet = std::make_shared( - actionState, summaryState, udqState, *this->eclIO_, + actionState, + isParallel ? this->collectToIORank_.globalWellTestState() : std::move(localWTestState), + summaryState, udqState, *this->eclIO_, reportStepNum, isSubStep, curTime, std::move(restartValue), doublePrecision); // then, make sure that the previous I/O request has been completed diff --git a/ebos/eclgenericwriter.hh b/ebos/eclgenericwriter.hh index 107fa115a..3288712ce 100644 --- a/ebos/eclgenericwriter.hh +++ b/ebos/eclgenericwriter.hh @@ -90,6 +90,7 @@ protected: data::Wells&& localWellData, data::GroupAndNetworkValues&& localGroupAndNetworkData, data::Aquifers&& localAquiferData, + WellTestState&& localWTestState, const Action::State& actionState, const UDQState& udqState, const SummaryState& summaryState, diff --git a/ebos/eclwriter.hh b/ebos/eclwriter.hh index 8e8219848..a77473650 100644 --- a/ebos/eclwriter.hh +++ b/ebos/eclwriter.hh @@ -269,6 +269,7 @@ public: std::move(localWellData), std::move(localGroupAndNetworkData), std::move(localAquiferData), + std::move(localWellTestState), this->actionState(), this->udqState(), this->summaryState(),