From: kronbichler Date: Thu, 13 Jun 2013 14:20:12 +0000 (+0000) Subject: Shortcut in smoother. Fix typo. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0778eb0e61b844e5138a48bbb71958cda297ecc;p=dealii-svn.git Shortcut in smoother. Fix typo. git-svn-id: https://svn.dealii.org/trunk@29817 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/multigrid/mg_smoother.h b/deal.II/include/deal.II/multigrid/mg_smoother.h index bbfbfcedff..f1c6d05e39 100644 --- a/deal.II/include/deal.II/multigrid/mg_smoother.h +++ b/deal.II/include/deal.II/multigrid/mg_smoother.h @@ -1230,8 +1230,13 @@ MGSmootherPrecondition::smooth( { if (this->debug > 0) deallog << 'T'; - matrices[level].Tvmult(*r,u); - r->sadd(-1.,1.,rhs); + if (i == 0 && u.all_zero()) + *r = rhs; + else + { + matrices[level].Tvmult(*r,u); + r->sadd(-1.,1.,rhs); + } if (this->debug > 2) deallog << ' ' << r->l2_norm() << ' '; smoothers[level].Tvmult(*d, *r); @@ -1242,8 +1247,13 @@ MGSmootherPrecondition::smooth( { if (this->debug > 0) deallog << 'N'; - matrices[level].vmult(*r,u); - r->sadd(-1.,rhs); + if (i == 0 && u.all_zero()) + *r = rhs; + else + { + matrices[level].vmult(*r,u); + r->sadd(-1.,rhs); + } if (this->debug > 2) deallog << ' ' << r->l2_norm() << ' '; smoothers[level].vmult(*d, *r); diff --git a/deal.II/source/fe/mapping_q1.cc b/deal.II/source/fe/mapping_q1.cc index e141e0a3a6..f6e575d7a1 100644 --- a/deal.II/source/fe/mapping_q1.cc +++ b/deal.II/source/fe/mapping_q1.cc @@ -961,7 +961,7 @@ namespace internal case 1: // in 1d, we don't have access to any of the data.aux // fields (because it has only dim-1 components), but we - // can still compute the boundary form simply by simply + // can still compute the boundary form by simply // looking at the number of the face boundary_forms[i][0] = (face_no == 0 ? -1 : +1);