]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix problem with max_smoothing of one cell grids.
authorhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 10 Jan 2000 14:58:26 +0000 (14:58 +0000)
committerhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 10 Jan 2000 14:58:26 +0000 (14:58 +0000)
git-svn-id: https://svn.dealii.org/trunk@2183 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/grid/tria.cc

index 3921b8fb6d533c8237a67fa4a31b8d22dbaf42b6..4d17934f2f31ad13a1b906d456a9b365aca5451c 100644 (file)
@@ -6327,11 +6327,29 @@ bool Triangulation<dim>::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<dim>::faces_per_cell) &&
                          (smooth_grid & eliminate_refined_inner_islands)) ||
                         ((unrefined_neighbors<GeometryInfo<dim>::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<GeometryInfo<dim>::children_per_cell; ++c)

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.