From 400b7921ca69b24b46992977a7b1008ddec43056 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 19 Apr 2000 12:02:06 +0000 Subject: [PATCH] Fix a bug where we looped over too many lines and faces in 3d and 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deal.II/deal.II/source/grid/tria.cc b/deal.II/deal.II/source/grid/tria.cc index e27874fb8d..94cd9f2d66 100644 --- a/deal.II/deal.II/source/grid/tria.cc +++ b/deal.II/deal.II/source/grid/tria.cc @@ -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(), true)); + levels[level+1]->quads.used.end(), + bind2nd (equal_to(), true)); // reserve space for the used_cells -- 2.39.5