From 67f138e273f3fd2a9f35c8ee9aa75b762f099c58 Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Mon, 9 Sep 2013 21:21:06 +0000 Subject: [PATCH] parallel geometric multigrid: limit the level difference at vertices git-svn-id: https://svn.dealii.org/trunk@30658 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/source/distributed/tria.cc | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) 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 -- 2.39.5