From: wolf Date: Thu, 23 Oct 2003 19:30:55 +0000 (+0000) Subject: Clean up comments. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39124e060e1549a777a9e5121a60589bcf30f672;p=dealii-svn.git Clean up comments. git-svn-id: https://svn.dealii.org/trunk@8147 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 64f3ab8eb6..adaffa56e6 100644 --- a/deal.II/deal.II/source/grid/grid_reordering.cc +++ b/deal.II/deal.II/source/grid/grid_reordering.cc @@ -1,13 +1,13 @@ //---------------------------- grid_reordering.cc --------------------------- -// grid_reordering.cc,v 1.27 2002/05/28 07:43:22 wolf Exp -// Version: +// grid_reordering.cc,v 1.27 2002/05/28 07:43:22 wolf Exp +// Version: // -// Copyright (C) 2000, 2001, 2002, 2003 by the deal.II authors +// Copyright (C) 2000, 2001, 2002, 2003 by the deal.II authors // -// This file is subject to QPL and may not be distributed -// without copyright and license information. Please refer -// to the file deal.II/doc/license.html for the text and -// further information on this license. +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. // //---------------------------- grid_reordering.cc --------------------------- @@ -247,8 +247,8 @@ namespace internal struct MQuad::MakeQuad : public std::binary_function, - std::vector, - MQuad> + std::vector, + MQuad> { MQuad operator()(const CellData<2> &q, const std::vector &elist) const @@ -583,33 +583,32 @@ namespace internal << "Grid Orientation Error: " << arg1); - //Switched two ints so that v1v2) - { - int t=v1; - v1=v2; - v2=t; - } + if (v1>v2) + std::swap (v1, v2); } + CheapEdge::CheapEdge(int n0, int n1) : node0(n0), node1(n1) { - //sort the entries so that node0(e2.node0)) return false; - if ((node1)<(e2.node1)) return true; + if (node0 < e2.node0) return true; + if (node0 > e2.node0) return false; + if (node1 < e2.node1) return true; return false; } - // This is the guts of the matter... + // This is the guts of the matter... void build_mesh(Mesh &m) { const ElementInfo &info = m.info; @@ -620,57 +619,74 @@ namespace internal unsigned int NumEdges=0; - // Corectly build the edge list + // Correctly build the edge + // list { - // edge_map stores the edge_number associated with a given CheapEdge + // edge_map stores the + // edge_number associated + // with a given CheapEdge std::map edge_map; unsigned int ctr=0; for(unsigned int cur_cell_id=0; cur_cell_id edge_count(NumEdges,0); - //Count every time an edge occurs in a cube. + // Count every time an edge + // occurs in a cube. for(unsigned int cur_cell_id=0; cur_cell_id cur_cell_edge_list_posn(NumEdges,0); for(unsigned int cur_cell_id =0; cur_cell_id::reorder_cells(std::vector >& incubes, std::vector > * node_vec_ptr) +void GridReordering<3>::reorder_cells(std::vector >& incubes, + std::vector > * node_vec_ptr) { Assert(incubes.size()!=0, ExcMessage("List of elements to orient was of zero length")); - // This keeps track of all the local element conectivity information. - // e.g. what edges come into which nodes and with which orientation + // This keeps track of all the + // local element conectivity + // information. e.g. what edges + // come into which nodes and with + // which orientation internal::GridReordering3d::DealElemInfo deal_info; - //This does the real work + // This does the real work internal::GridReordering3d::Orienter orienter; - // This is the internal store for all global connectivity information - // it starts prety much empty. + // This is the internal store for + // all global connectivity + // information it starts prety much + // empty. internal::GridReordering3d::Mesh the_mesh(deal_info); if(node_vec_ptr!=NULL) @@ -1346,7 +1458,8 @@ void GridReordering<3>::reorder_cells(std::vector >& incubes, std::v the_mesh.node_list=*node_vec_ptr; } - //Copy the cells into our own internal data format. + // Copy the cells into our own + // internal data format. const unsigned int numelems=incubes.size(); for(unsigned int i =0 ; i::reorder_cells(std::vector >& incubes, std::v the_mesh.cell_list.push_back(the_cell); } - // Build the conectivity information - // This fills in the conectivity information in the internal structure + // Build the conectivity + // information This fills in the + // conectivity information in the + // internal structure build_mesh(the_mesh); - //Orient the mesh + // Orient the mesh orienter.orient_edges(the_mesh); - // Now we have a bunch of oriented edges int the structure - // we only have to turn the cubes so thy match the edge orientation. - + // Now we have a bunch of oriented + // edges int the structure we only + // have to turn the cubes so thy + // match the edge orientation. orienter.orient_cubes(the_mesh); - // Copy the elements from our internal structure back into - // their original location. - + // Copy the elements from our + // internal structure back into + // their original location. for(unsigned int i =0 ; i