From fc5fd4c5a46f0de5e0b6cd9c3916c071f72e62bf Mon Sep 17 00:00:00 2001 From: Markus Blatt <markus@dr-blatt.de> Date: Mon, 2 Sep 2013 16:42:45 +0200 Subject: [PATCH] [Bugfix] Corrects current residual after postsmoothing. Previously the current residual was not updated after the coarse grid correction. This patch fixes this by storing the only the prolongated coarse grid correction in context.lhs and updating the accumulated update. During postsmoothing the currently residual is updated according to context.lhs. --- dune/istl/paamg/twolevelmethod.hh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dune/istl/paamg/twolevelmethod.hh b/dune/istl/paamg/twolevelmethod.hh index 163f0cc8e..091687234 100644 --- a/dune/istl/paamg/twolevelmethod.hh +++ b/dune/istl/paamg/twolevelmethod.hh @@ -402,9 +402,10 @@ public: policy_->moveToCoarseLevel(*context.rhs); InverseOperatorResult res; coarseSolver_->apply(policy_->getCoarseLevelLhs(), policy_->getCoarseLevelRhs(), res); - policy_->moveToFineLevel(*context.update); - // Postsmoothing *context.lhs=0; + policy_->moveToFineLevel(*context.lhs); + *context.update += *context.lhs; + // Postsmoothing postsmooth(context, postSteps_); } -- GitLab