From 5bb0942a02713d568c983ca1c7e734b0081ead5e Mon Sep 17 00:00:00 2001 From: Vegard Kippe Date: Mon, 16 Oct 2023 10:38:08 +0200 Subject: [PATCH] Reverting unintended change. --- opm/simulators/wells/BlackoilWellModelGeneric.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/opm/simulators/wells/BlackoilWellModelGeneric.cpp b/opm/simulators/wells/BlackoilWellModelGeneric.cpp index cec29bb05..c652bd4f7 100644 --- a/opm/simulators/wells/BlackoilWellModelGeneric.cpp +++ b/opm/simulators/wells/BlackoilWellModelGeneric.cpp @@ -1392,6 +1392,12 @@ bool BlackoilWellModelGeneric:: shouldBalanceNetwork(const int reportStepIdx, const int iterationIdx) const { + // if network is not active, we do not need to balance the network + const auto& network = schedule()[reportStepIdx].network(); + if (!network.active()) { + return false; + } + const auto& balance = schedule()[reportStepIdx].network_balance(); if (balance.mode() == Network::Balance::CalcMode::TimeStepStart) { return iterationIdx == 0;