From 4dff6fb16843062c57216d78bc8ecea574c61950 Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Mon, 14 Dec 2020 16:14:13 +0100 Subject: [PATCH] Fixes StandardWell::updateProductivityIndex for distributed wells. --- opm/simulators/wells/StandardWell_impl.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/opm/simulators/wells/StandardWell_impl.hpp b/opm/simulators/wells/StandardWell_impl.hpp index 758313628..6961239af 100644 --- a/opm/simulators/wells/StandardWell_impl.hpp +++ b/opm/simulators/wells/StandardWell_impl.hpp @@ -2281,6 +2281,12 @@ namespace Opm connPI += np; } + // Sum with communication in case of distributed well. + const auto& comm = this->parallel_well_info_.communication(); + if (comm.size() > 1) + { + comm.sum(wellPI, np); + } assert (static_cast(subsetPerfID) == this->number_of_perforations_ && "Internal logic error in processing connections for PI/II"); }