From 999ffd278e8835c29386f9dc74e25cce8fbfcb3c Mon Sep 17 00:00:00 2001 From: bangerth Date: Fri, 19 Nov 2010 00:12:16 +0000 Subject: [PATCH] Fix the mess I created: the whole rearranging I did earlier meant that we couldn't do any anisotropic refinement any more -- which happens internally when building some of the elements. git-svn-id: https://svn.dealii.org/trunk@22812 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/source/grid/tria.cc | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/deal.II/source/grid/tria.cc b/deal.II/source/grid/tria.cc index c5783dadb1..21ac85c0fc 100644 --- a/deal.II/source/grid/tria.cc +++ b/deal.II/source/grid/tria.cc @@ -3820,18 +3820,6 @@ namespace internal |0 | 1| .--.--. */ - - // find the next - // unused vertex and - // allocate it for - // the new vertex we - // need here - while (triangulation.vertices_used[next_unused_vertex] == true) - ++next_unused_vertex; - Assert (next_unused_vertex < triangulation.vertices.size(), - ExcTooFewVerticesAllocated()); - triangulation.vertices_used[next_unused_vertex] = true; - // collect the // indices of the // eight @@ -3848,10 +3836,23 @@ namespace internal for (unsigned int line_no=0; line_no<4; ++line_no) if (cell->line(line_no)->has_children()) new_vertices[4+line_no]=cell->line(line_no)->child(0)->vertex_index(1); - new_vertices[8] = next_unused_vertex; if (ref_case==RefinementCase::cut_xy) { + + // find the next + // unused vertex and + // allocate it for + // the new vertex we + // need here + while (triangulation.vertices_used[next_unused_vertex] == true) + ++next_unused_vertex; + Assert (next_unused_vertex < triangulation.vertices.size(), + ExcTooFewVerticesAllocated()); + triangulation.vertices_used[next_unused_vertex] = true; + + new_vertices[8] = next_unused_vertex; + // if this quad lives // in 2d, then we can // compute the new -- 2.39.5