From: Timo Heister Date: Mon, 9 Sep 2013 21:21:06 +0000 (+0000) Subject: parallel geometric multigrid: limit the level difference at vertices X-Git-Tag: v8.1.0~844 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67f138e273f3fd2a9f35c8ee9aa75b762f099c58;p=dealii.git parallel geometric multigrid: limit the level difference at vertices git-svn-id: https://svn.dealii.org/trunk@30658 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/distributed/tria.cc b/deal.II/source/distributed/tria.cc index 1af0693130..93145356aa 100644 --- a/deal.II/source/distributed/tria.cc +++ b/deal.II/source/distributed/tria.cc @@ -2596,10 +2596,20 @@ namespace parallel // smoothing flag is used in the normal // refinement process. typename Triangulation::MeshSmoothing - save_smooth = this->smooth_grid; - this->smooth_grid = dealii::Triangulation::none; - bool mesh_changed = false; + save_smooth = this->smooth_grid; + + // We will refine manually to match the p4est further down, which + // obeys a level difference of 2 at each vertex (see the balance call + // to p4est). We can disable this here so we store fewer artificial + // cells (in some cases). For geometric multigrid it turns out that + // we will miss level cells at shared vertices if we ignore this. + // See tests/mpi/mg_06. + if (settings & construct_multigrid_hierarchy) + this->smooth_grid = dealii::Triangulation::none; + else + this->smooth_grid = dealii::Triangulation::limit_level_difference_at_vertices; + bool mesh_changed = false; // remove all deal.II refinements. Note that we could skip this and // start from our current state, because the algorithm later coarsens as