From 118ccc60e3c6e272b8627100afd9a0866fb5257f Mon Sep 17 00:00:00 2001 From: Lisa Julia Nebel Date: Thu, 17 Oct 2024 14:01:55 +0200 Subject: [PATCH] Split the operation duneB_.mmv(x, resWell) in recoverSolutionWell into its two parts This is needed to later add communication for the multiplication with the matrix duneB_, since here we go from cells to segments, and everything concerning segments is stored globally. --- opm/simulators/wells/MultisegmentWellEquations.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/opm/simulators/wells/MultisegmentWellEquations.cpp b/opm/simulators/wells/MultisegmentWellEquations.cpp index d229c71911..23bddf3d72 100644 --- a/opm/simulators/wells/MultisegmentWellEquations.cpp +++ b/opm/simulators/wells/MultisegmentWellEquations.cpp @@ -207,9 +207,13 @@ template void MultisegmentWellEquations:: recoverSolutionWell(const BVector& x, BVectorWell& xw) const { - BVectorWell resWell = resWell_; + BVectorWell Bx(duneB_.N()); + duneB_.mv(x, Bx); + // resWell = resWell - B * x - duneB_.mmv(x, resWell); + BVectorWell resWell = resWell_; + resWell -= Bx; + // xw = D^-1 * resWell xw = mswellhelpers::applyUMFPack(*duneDSolver_, resWell); }