From: Martin Kronbichler Date: Thu, 4 Feb 2010 11:22:51 +0000 (+0000) Subject: Simplify smoother usage a little bit. Avoid setting elements in vvectors that will... X-Git-Tag: v8.0.0~6555 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b8470162c51d0be2207ed85a3fe5cd9430f7eec;p=dealii.git Simplify smoother usage a little bit. Avoid setting elements in vvectors that will be overwritten anyway. git-svn-id: https://svn.dealii.org/trunk@20492 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/multigrid/mg_smoother.h b/deal.II/deal.II/include/multigrid/mg_smoother.h index 7f4ff69a48..13fa78ecc6 100644 --- a/deal.II/deal.II/include/multigrid/mg_smoother.h +++ b/deal.II/deal.II/include/multigrid/mg_smoother.h @@ -954,8 +954,8 @@ MGSmootherPrecondition::smooth( try { - r->reinit(u); - d->reinit(u); + r->reinit(u,true); + d->reinit(u,true); bool T = this->transpose; if (this->symmetric && (steps2 % 2 == 0)) @@ -980,7 +980,7 @@ MGSmootherPrecondition::smooth( if (this->debug > 0) deallog << 'N'; matrices[level].vmult(*r,u); - r->sadd(-1.,1.,rhs); + r->sadd(-1.,rhs); if (this->debug > 2) deallog << ' ' << r->l2_norm() << ' '; smoothers[level].vmult(*d, *r);