From: Martin Kronbichler Date: Wed, 20 Feb 2013 09:14:33 +0000 (+0000) Subject: Move some code out of a loop where it is only called in the first iteration as this... X-Git-Tag: v8.0.0~1215 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a72e1cac1ac13b1df3d2945f3a72d278d7a7da7a;p=dealii.git Move some code out of a loop where it is only called in the first iteration as this enhances code readability. git-svn-id: https://svn.dealii.org/trunk@28489 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/multigrid/multigrid.templates.h b/deal.II/include/deal.II/multigrid/multigrid.templates.h index cfee9c22a9..17226ffdf0 100644 --- a/deal.II/include/deal.II/multigrid/multigrid.templates.h +++ b/deal.II/include/deal.II/multigrid/multigrid.templates.h @@ -156,6 +156,16 @@ Multigrid::level_v_step(const unsigned int level) // std::cout<vmult_add(level, t[level], solution[level]); + if (debug>2) + deallog << "Norm t[" << level << "] " << t[level].l2_norm() << std::endl; + } + + if (edge_down != 0) + edge_down->vmult(level, t[level-1], solution[level]); + // make t rhs of lower level The // non-refined parts of the // coarse-level defect already @@ -164,15 +174,6 @@ Multigrid::level_v_step(const unsigned int level) for (unsigned int l = level; l>minlevel; --l) { t[l-1] = 0.; - if (l==level && edge_out != 0) - { - edge_out->vmult_add(level, t[level], solution[level]); - if (debug>2) - deallog << "Norm t[" << level << "] " << t[level].l2_norm() << std::endl; - } - - if (l==level && edge_down != 0) - edge_down->vmult(level, t[level-1], solution[level]); transfer->restrict_and_add (l, t[l-1], t[l]); if (debug>3)