Add WellTestState argument when calling IO routines

This commit is contained in:
Joakim Hove
2021-10-02 21:05:16 +02:00
parent 9a9ff39908
commit dcd5fc76a0
3 changed files with 10 additions and 1 deletions

View File

@@ -106,6 +106,7 @@ bool directVerticalNeighbors(const std::array<int, 3>& cartDims,
struct EclWriteTasklet : public Opm::TaskletInterface struct EclWriteTasklet : public Opm::TaskletInterface
{ {
Opm::Action::State actionState_; Opm::Action::State actionState_;
Opm::WellTestState wtestState_;
Opm::SummaryState summaryState_; Opm::SummaryState summaryState_;
Opm::UDQState udqState_; Opm::UDQState udqState_;
Opm::EclipseIO& eclIO_; Opm::EclipseIO& eclIO_;
@@ -116,6 +117,7 @@ struct EclWriteTasklet : public Opm::TaskletInterface
bool writeDoublePrecision_; bool writeDoublePrecision_;
explicit EclWriteTasklet(const Opm::Action::State& actionState, explicit EclWriteTasklet(const Opm::Action::State& actionState,
const Opm::WellTestState& wtestState,
const Opm::SummaryState& summaryState, const Opm::SummaryState& summaryState,
const Opm::UDQState& udqState, const Opm::UDQState& udqState,
Opm::EclipseIO& eclIO, Opm::EclipseIO& eclIO,
@@ -125,6 +127,7 @@ struct EclWriteTasklet : public Opm::TaskletInterface
Opm::RestartValue restartValue, Opm::RestartValue restartValue,
bool writeDoublePrecision) bool writeDoublePrecision)
: actionState_(actionState) : actionState_(actionState)
, wtestState_(wtestState)
, summaryState_(summaryState) , summaryState_(summaryState)
, udqState_(udqState) , udqState_(udqState)
, eclIO_(eclIO) , eclIO_(eclIO)
@@ -139,6 +142,7 @@ struct EclWriteTasklet : public Opm::TaskletInterface
void run() void run()
{ {
eclIO_.writeTimeStep(actionState_, eclIO_.writeTimeStep(actionState_,
wtestState_,
summaryState_, summaryState_,
udqState_, udqState_,
reportStepNum_, reportStepNum_,
@@ -392,6 +396,7 @@ doWriteOutput(const int reportStepNum,
data::Wells&& localWellData, data::Wells&& localWellData,
data::GroupAndNetworkValues&& localGroupAndNetworkData, data::GroupAndNetworkValues&& localGroupAndNetworkData,
data::Aquifers&& localAquiferData, data::Aquifers&& localAquiferData,
WellTestState&& localWTestState,
const Action::State& actionState, const Action::State& actionState,
const UDQState& udqState, const UDQState& udqState,
const SummaryState& summaryState, const SummaryState& summaryState,
@@ -429,7 +434,9 @@ doWriteOutput(const int reportStepNum,
// first, create a tasklet to write the data for the current time // first, create a tasklet to write the data for the current time
// step to disk // step to disk
auto eclWriteTasklet = std::make_shared<EclWriteTasklet>( auto eclWriteTasklet = std::make_shared<EclWriteTasklet>(
actionState, summaryState, udqState, *this->eclIO_, actionState,
isParallel ? this->collectToIORank_.globalWellTestState() : std::move(localWTestState),
summaryState, udqState, *this->eclIO_,
reportStepNum, isSubStep, curTime, std::move(restartValue), doublePrecision); reportStepNum, isSubStep, curTime, std::move(restartValue), doublePrecision);
// then, make sure that the previous I/O request has been completed // then, make sure that the previous I/O request has been completed

View File

@@ -90,6 +90,7 @@ protected:
data::Wells&& localWellData, data::Wells&& localWellData,
data::GroupAndNetworkValues&& localGroupAndNetworkData, data::GroupAndNetworkValues&& localGroupAndNetworkData,
data::Aquifers&& localAquiferData, data::Aquifers&& localAquiferData,
WellTestState&& localWTestState,
const Action::State& actionState, const Action::State& actionState,
const UDQState& udqState, const UDQState& udqState,
const SummaryState& summaryState, const SummaryState& summaryState,

View File

@@ -269,6 +269,7 @@ public:
std::move(localWellData), std::move(localWellData),
std::move(localGroupAndNetworkData), std::move(localGroupAndNetworkData),
std::move(localAquiferData), std::move(localAquiferData),
std::move(localWellTestState),
this->actionState(), this->actionState(),
this->udqState(), this->udqState(),
this->summaryState(), this->summaryState(),