]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
revert to iterating back-wards which was changed in r30061 and broke a couple of...
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 21 Jul 2013 23:47:29 +0000 (23:47 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 21 Jul 2013 23:47:29 +0000 (23:47 +0000)
git-svn-id: https://svn.dealii.org/trunk@30082 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/grid/tria.cc

index 42aaa7279e23d1dcb3c6b29daf5db8ae413a1f6c..d55a04bedfa93da53f4bb0f2926643b4d0b2871c 100644 (file)
@@ -12208,9 +12208,9 @@ void Triangulation<dim, spacedim>::execute_coarsening ()
   //
   // since we delete the *children* of cells, we only need to start
   // considering cells on the second highest level, n_levels()-2.
-  for (int level = n_levels()-2; level>=0; --level)
-    for (cell = begin(level); cell!=end(level); ++cell)
-      if (cell->user_flag_set())
+  if (levels.size() >= 2)
+    for (cell = last(); cell!=endc; --cell)
+      if (cell->user_flag_set() && cell->level()<=static_cast<int>(levels.size()-2))
         // use a separate function,
         // since this is dimension
         // specific

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.