From 414c3251f5b20fe66319fe4e7d9d73c307acb842 Mon Sep 17 00:00:00 2001 From: hartmann Date: Mon, 10 Jan 2000 14:58:26 +0000 Subject: [PATCH] Fix problem with max_smoothing of one cell grids. git-svn-id: https://svn.dealii.org/trunk@2183 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/grid/tria.cc | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/deal.II/deal.II/source/grid/tria.cc b/deal.II/deal.II/source/grid/tria.cc index 3921b8fb6d..4d17934f2f 100644 --- a/deal.II/deal.II/source/grid/tria.cc +++ b/deal.II/deal.II/source/grid/tria.cc @@ -6327,11 +6327,29 @@ bool Triangulation::prepare_coarsening_and_refinement () { // between the two versions of // the eliminate_refined_*_islands // flag - if ((unrefined_neighbors == total_neighbors) && + // + // the last check + // is whether + // there are any + // neighbors at + // all. if not + // so, then we + // are (e.g.) on + // the coarsest + // grid with one + // cell, for + // which, of + // course, we do + // not remove the + // refine flag. + if ((unrefined_neighbors == total_neighbors) + && (((unrefined_neighbors==GeometryInfo::faces_per_cell) && (smooth_grid & eliminate_refined_inner_islands)) || ((unrefined_neighbors::faces_per_cell) && - (smooth_grid & eliminate_refined_boundary_islands)) )) + (smooth_grid & eliminate_refined_boundary_islands)) ) + && + (total_neighbors != 0)) if (!cell->active()) for (unsigned int c=0; c::children_per_cell; ++c) -- 2.39.5