]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Check in the fix for one bug, before starting to find the next one.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 21 Jun 1999 15:12:36 +0000 (15:12 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 21 Jun 1999 15:12:36 +0000 (15:12 +0000)
git-svn-id: https://svn.dealii.org/trunk@1424 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 0b789af5e78928232d6834f3006e56e5cc40d730..984b40bedd3fa53bdeaf475216ba85ca640e850d 100644 (file)
@@ -6362,7 +6362,7 @@ bool Triangulation<dim>::prepare_coarsening_and_refinement () {
                                           // and maybe already flag additional
                                           // cells in this loop
          for (cell=last_active(); cell != endc; --cell)
-           if (!cell->refine_flag_set() == true) 
+           if (cell->refine_flag_set() == false) 
              for (unsigned int vertex=0;
                   vertex<GeometryInfo<dim>::vertices_per_cell; ++vertex)
                if (vertex_level[cell->vertex_index(vertex)] >
@@ -6385,7 +6385,26 @@ bool Triangulation<dim>::prepare_coarsening_and_refinement () {
                         ++v)
                      vertex_level[cell->vertex_index(v)]
                        = max (vertex_level[cell->vertex_index(v)],
-                                cell->level()+1);
+                              cell->level()+1);
+
+                                                    // now that we fixed this cell,
+                                                    // we can safely leave this
+                                                    // inner loop. however, we check
+                                                    // the remaining vertices before
+                                                    // leaving. note that since
+                                                    // we flagged this cell, 
+                                                    // vertex_level might be up to
+                                                    // three levels higher than this
+                                                    // cell
+                   for (unsigned int v=vertex+1; v<GeometryInfo<dim>::vertices_per_cell;
+                        ++v)
+                     Assert (vertex_level[cell->vertex_index(v)]
+                             <=
+                             cell->level()+3,
+                             ExcInternalError());
+                   
+                                                    // next cell
+                   break;
                  };      
        };
 

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.