From 6aadfcd9781f49a240e998718efc5b78b9eebb4d Mon Sep 17 00:00:00 2001 From: wolf Date: Fri, 24 Oct 2003 14:21:44 +0000 Subject: [PATCH] More changes toward our usual coding conventions. git-svn-id: https://svn.dealii.org/trunk@8157 0785d39b-7218-0410-832d-ea1e28bc413d --- .../deal.II/include/grid/grid_reordering.h | 3 +- .../include/grid/grid_reordering_internal.h | 33 +++--- .../deal.II/source/grid/grid_reordering.cc | 105 +++++++++--------- 3 files changed, 67 insertions(+), 74 deletions(-) diff --git a/deal.II/deal.II/include/grid/grid_reordering.h b/deal.II/deal.II/include/grid/grid_reordering.h index 7a71c0468b..6153451658 100644 --- a/deal.II/deal.II/include/grid/grid_reordering.h +++ b/deal.II/deal.II/include/grid/grid_reordering.h @@ -648,8 +648,7 @@ class GridReordering<3> * the general documentation of * this class. */ - static void reorder_cells (std::vector > &original_cells, - std::vector > * node_vec_ptr=NULL); + static void reorder_cells (std::vector > &original_cells); }; diff --git a/deal.II/deal.II/include/grid/grid_reordering_internal.h b/deal.II/deal.II/include/grid/grid_reordering_internal.h index 7701dab3b2..fc0931020c 100644 --- a/deal.II/deal.II/include/grid/grid_reordering_internal.h +++ b/deal.II/deal.II/include/grid/grid_reordering_internal.h @@ -496,15 +496,25 @@ namespace internal */ struct Cell { + /** + * Default Constructor + */ + Cell (); + + /** + * Copy Constructor + */ + Cell (const Cell &c); + /** * The IDs for each of the edges. */ - int edges[GeometryInfo<3>::lines_per_cell]; + unsigned int edges[GeometryInfo<3>::lines_per_cell]; /** * The IDs for each of the nodes. */ - int nodes[GeometryInfo<3>::vertices_per_cell]; + unsigned int nodes[GeometryInfo<3>::vertices_per_cell]; /** * Which way do the edges @@ -523,17 +533,7 @@ namespace internal * to be oriented in the * current sheet. */ - bool waiting_to_be_processed; - - /** - * Copy Constructor - */ - Cell (const Cell &c); - - /** - * Default Constructor - */ - Cell(); + bool waiting_to_be_processed; }; @@ -554,14 +554,11 @@ namespace internal */ Mesh (); - /** - * The list of nodes - */ - std::vector > node_list; /** * The list of edges */ std::vector edge_list; + /** * The list of cells */ @@ -578,7 +575,7 @@ namespace internal * Unimplemented private copy * constructor to disable it. */ - Mesh(const Mesh&); + Mesh (const Mesh&); /** * Unimplemented private diff --git a/deal.II/deal.II/source/grid/grid_reordering.cc b/deal.II/deal.II/source/grid/grid_reordering.cc index ed632fd2bd..50629e6a87 100644 --- a/deal.II/deal.II/source/grid/grid_reordering.cc +++ b/deal.II/deal.II/source/grid/grid_reordering.cc @@ -578,7 +578,7 @@ namespace internal { namespace GridReordering3d { - DeclException1 (GridOrientError, + DeclException1 (ExcGridOrientError, char *, << "Grid Orientation Error: " << arg1); @@ -857,14 +857,14 @@ namespace internal Cell::Cell () { - for (unsigned int i = 0; i::lines_per_cell; ++i) + for (unsigned int i=0; i::lines_per_cell; ++i) { - edges[i] = -1; + edges[i] = static_cast(-1); local_orientation_flags[i] = 1; } - for (unsigned int i = 0; i::vertices_per_cell; ++i) - nodes[i] = -1; + for (unsigned int i=0; i::vertices_per_cell; ++i) + nodes[i] = static_cast(-1); waiting_to_be_processed = false; } @@ -904,12 +904,12 @@ namespace internal const unsigned int ge1 = c.edges[e1]; const unsigned int ge2 = c.edges[e2]; - int or0 = ElementInfo::edge_to_node_orient[local_node_num][0] * - c.local_orientation_flags[e0]; - int or1 = ElementInfo::edge_to_node_orient[local_node_num][1] * - c.local_orientation_flags[e1]; - int or2 = ElementInfo::edge_to_node_orient[local_node_num][2] * - c.local_orientation_flags[e2]; + const int or0 = ElementInfo::edge_to_node_orient[local_node_num][0] * + c.local_orientation_flags[e0]; + const int or1 = ElementInfo::edge_to_node_orient[local_node_num][1] * + c.local_orientation_flags[e1]; + const int or2 = ElementInfo::edge_to_node_orient[local_node_num][2] * + c.local_orientation_flags[e2]; // Make sure that edges agree // what the current node should @@ -978,7 +978,7 @@ namespace internal // have a // contradiction AssertThrow(consistent(m,cur_posn), - GridOrientError("Mesh is Unorientable")); + ExcGridOrientError("Mesh is Unorientable")); // If we needed to // orient any edges // in the current @@ -1106,7 +1106,7 @@ namespace internal // should be un-oriented for (int j = egrp*4; j::reorder_cells(std::vector > &incubes, - std::vector > *node_vec_ptr) +void GridReordering<3>::reorder_cells (std::vector > &incubes) { Assert (incubes.size() != 0, @@ -1360,9 +1360,6 @@ void GridReordering<3>::reorder_cells(std::vector > &incubes, // information it starts prety much // empty. internal::GridReordering3d::Mesh the_mesh; - - if (node_vec_ptr != NULL) - the_mesh.node_list = *node_vec_ptr; // Copy the cells into our own // internal data format. -- 2.39.5