]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix a bug where we looped over too many lines and faces in 3d and
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 19 Apr 2000 12:02:06 +0000 (12:02 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 19 Apr 2000 12:02:06 +0000 (12:02 +0000)
obtained too high an estimate of the number of vertices/lines/quads
needed upon refinement.

git-svn-id: https://svn.dealii.org/trunk@2748 0785d39b-7218-0410-832d-ea1e28bc413d

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

index e27874fb8d12b25cfc0cdb0d1faaa4dfe46521a3..94cd9f2d662752c32a01d23b2e038ee13c8c3ee3 100644 (file)
@@ -4387,7 +4387,7 @@ void Triangulation<3>::execute_refinement () {
 
                                       // now count the quads and lines which
                                       // were flagged for refinement
-      for (quad_iterator quad=begin_quad(); quad!=end_quad(); ++quad)
+      for (quad_iterator quad=begin_quad(level); quad!=end_quad(level); ++quad)
        if (quad->user_flag_set())
          {
            Assert (quad->has_children() == false, ExcInternalError());
@@ -4396,7 +4396,7 @@ void Triangulation<3>::execute_refinement () {
            needed_vertices += 1;
          };
 
-      for (line_iterator line=begin_line(); line!=end_line(); ++line)
+      for (line_iterator line=begin_line(level); line!=end_line(level); ++line)
        if (line->user_flag_set())
          {
            Assert (line->has_children() == false, ExcInternalError());
@@ -4409,8 +4409,8 @@ void Triangulation<3>::execute_refinement () {
                                       // the next higher level
       const unsigned int used_cells
        = count_if (levels[level+1]->quads.used.begin(),
-               levels[level+1]->quads.used.end(),
-               bind2nd (equal_to<bool>(), true));
+                   levels[level+1]->quads.used.end(),
+                   bind2nd (equal_to<bool>(), true));
 
 
                                       // reserve space for the used_cells

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.