]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Bug fix for patch_level_1: Avoid creation of cells on level 0 during coarsening_and_r...
authorRalf Hartmann <Ralf.Hartmann@dlr.de>
Wed, 20 Dec 2006 10:41:09 +0000 (10:41 +0000)
committerRalf Hartmann <Ralf.Hartmann@dlr.de>
Wed, 20 Dec 2006 10:41:09 +0000 (10:41 +0000)
git-svn-id: https://svn.dealii.org/trunk@14265 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 2e7343a5c79c181b3b77dd986a38336bc8c72da7..207f9d10aa97497aa2f1ed8faa7e6d9ae400c554 100644 (file)
@@ -7562,7 +7562,8 @@ bool Triangulation<dim>::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<dim>::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<dim>::cell_iterator
            cell=begin(1),

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.