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); }