From: mike Date: Mon, 27 Oct 2003 22:39:32 +0000 (+0000) Subject: Made the use of edge_orient_array clearer and commented its use X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05c90a5195701a017f69836fb44d3046676cc93e;p=dealii-svn.git Made the use of edge_orient_array clearer and commented its use git-svn-id: https://svn.dealii.org/trunk@8167 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/grid/grid_reordering.cc b/deal.II/deal.II/source/grid/grid_reordering.cc index 7f13ca5622..0fc2fa5e58 100644 --- a/deal.II/deal.II/source/grid/grid_reordering.cc +++ b/deal.II/deal.II/source/grid/grid_reordering.cc @@ -1134,6 +1134,8 @@ namespace internal = c.local_orientation_flags[edge]; mesh.edge_list[c.edges[edge]].group = cur_edge_group; + // Remember that we have oriented + // this edge in the current cell. edge_orient_array[edge] = true; return true; @@ -1196,6 +1198,8 @@ namespace internal mesh.edge_list[c.edges[i]].orientation_flag = c.local_orientation_flags[i]*glorient; mesh.edge_list[c.edges[i]].group = cur_edge_group; + // Remember that we have oriented + // this edge in the current cell. edge_orient_array[i] = true; } @@ -1208,10 +1212,11 @@ namespace internal { const Cell &c = mesh.cell_list[cur_posn]; for (unsigned int e=0; e<12; ++e) + // Only need to add the adjacent + // cubes for edges we recently + // oriented if (edge_orient_array[e] == true) { - edge_orient_array[e] = false; - const Edge & the_edge = mesh.edge_list[c.edges[e]]; for (unsigned int local_cube_num = 0; local_cube_num < the_edge.neighboring_cubes.size(); @@ -1220,7 +1225,10 @@ namespace internal const unsigned int global_cell_num = the_edge.neighboring_cubes[local_cube_num]; Cell &ncell = mesh.cell_list[global_cell_num]; - + + // If the cell is waiting to be + // processed we dont want to add + // it to the list a second time. if (!ncell.waiting_to_be_processed) { sheet_to_process.push_back(global_cell_num); @@ -1228,6 +1236,11 @@ namespace internal } } } + // we're done with this cube so + // clear its processing flags. + for (unsigned int e=0; e<12; ++e) + edge_orient_array[e] = false; + }