From: hartmann Date: Wed, 20 Dec 2006 10:41:09 +0000 (+0000) Subject: Bug fix for patch_level_1: Avoid creation of cells on level 0 during coarsening_and_r... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09f8ef6fc172bf50145144e371f70e8d2987b14a;p=dealii-svn.git Bug fix for patch_level_1: Avoid creation of cells on level 0 during coarsening_and_refinement. git-svn-id: https://svn.dealii.org/trunk@14265 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/grid/tria.cc b/deal.II/deal.II/source/grid/tria.cc index 2e7343a5c7..207f9d10aa 100644 --- a/deal.II/deal.II/source/grid/tria.cc +++ b/deal.II/deal.II/source/grid/tria.cc @@ -7562,7 +7562,8 @@ bool Triangulation::prepare_coarsening_and_refinement () // are done the first. the // following order is chosen: // - // 0/ Only if coarsest_level_1 is set: + // 0/ Only if coarsest_level_1 or + // patch_level_1 is set: // clear all coarsen flags on level 1 // to avoid level 0 cells being // created by coarsening. @@ -7643,11 +7644,13 @@ bool Triangulation::prepare_coarsening_and_refinement () ////////////////////////////////////// // STEP 0: - // Only if coarsest_level_1 is set: + // Only if coarsest_level_1 or + // patch_level_1 is set: // clear all coarsen flags on level 1 // to avoid level 0 cells being // created by coarsening. - if (smooth_grid & coarsest_level_1 && n_levels()>=2) + if (((smooth_grid & coarsest_level_1) || + (smooth_grid & patch_level_1)) && n_levels()>=2) { typename Triangulation::cell_iterator cell=begin(1),