From: Timo Heister Date: Sun, 21 Jul 2013 23:47:29 +0000 (+0000) Subject: revert to iterating back-wards which was changed in r30061 and broke a couple of... X-Git-Tag: v8.0.0~40 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8fd868d546831275d88d2493fa047956059555d8;p=dealii.git revert to iterating back-wards which was changed in r30061 and broke a couple of tests (I don't understand why exactly though) git-svn-id: https://svn.dealii.org/trunk@30082 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/grid/tria.cc b/deal.II/source/grid/tria.cc index 42aaa7279e..d55a04bedf 100644 --- a/deal.II/source/grid/tria.cc +++ b/deal.II/source/grid/tria.cc @@ -12208,9 +12208,9 @@ void Triangulation::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(levels.size()-2)) // use a separate function, // since this is dimension // specific