]> https://gitweb.dealii.org/ - dealii.git/commitdiff
testing hook
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Mon, 15 Apr 2013 13:57:37 +0000 (13:57 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Mon, 15 Apr 2013 13:57:37 +0000 (13:57 +0000)
git-svn-id: https://svn.dealii.org/trunk@29279 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/grid/grid_generator.cc

index 9f80cc3422c31bcf82aae6c5af51ffa40e2cdfc2..26a3602a7cc5fed7e73c32066678e2fb34f9eebc 100644 (file)
@@ -47,7 +47,7 @@ DEAL_II_NAMESPACE_OPEN
 namespace
 {
   // Corner points of the cube [-1,1]^3
-  const Point<3> hexahedron[8] =
+     const Point<3> hexahedron[8] =
   {
     Point<3>(-1,-1,-1),
     Point<3>(+1,-1,-1),
@@ -3378,7 +3378,7 @@ merge_triangulations (const Triangulation<dim, spacedim> &triangulation_1,
 
 void
 GridGenerator::
-extrude_triangulation(const Triangulation<2, 2> & input,
+extrude_triangulation(const Triangulation<2, 2> &input,
                       const unsigned int n_slices,
                       const double height,
                       Triangulation<3,3> &result)
@@ -3393,30 +3393,30 @@ extrude_triangulation(const Triangulation<2, 2> & input,
   std::vector<CellData<3> > cells;
   cells.reserve((n_slices-1)*input.n_active_cells());
 
-  for (unsigned int slice=0;slice<n_slices;++slice)
+  for (unsigned int slice=0; slice<n_slices; ++slice)
     {
-      for (unsigned int i=0;i<input.n_vertices();++i)
+      for (unsigned int i=0; i<input.n_vertices(); ++i)
 
-      {
-        const Point<2> & v = input.get_vertices()[i];
-        points[i+slice*input.n_vertices()](0) = v(0);
-        points[i+slice*input.n_vertices()](1) = v(1);
-        points[i+slice*input.n_vertices()](2) = height * slice / (n_slices-1);
-      }
+        {
+          const Point<2> &v = input.get_vertices()[i];
+          points[i+slice*input.n_vertices()](0) = v(0);
+          points[i+slice*input.n_vertices()](1) = v(1);
+          points[i+slice*input.n_vertices()](2) = height * slice / (n_slices-1);
+        }
     }
 
   for (Triangulation<2,2>::cell_iterator
-      cell = input.begin(); cell != input.end(); ++cell)
+       cell = input.begin(); cell != input.end(); ++cell)
     {
-      for (unsigned int slice=0;slice<n_slices-1;++slice)
+      for (unsigned int slice=0; slice<n_slices-1; ++slice)
         {
           CellData<3> this_cell;
           for (unsigned int v=0; v<GeometryInfo<2>::vertices_per_cell; ++v)
             {
               this_cell.vertices[v]
-                                 = cell->vertex_index(v)+slice*input.n_vertices();
+                = cell->vertex_index(v)+slice*input.n_vertices();
               this_cell.vertices[v+GeometryInfo<2>::vertices_per_cell]
-                                 = cell->vertex_index(v)+(slice+1)*input.n_vertices();
+                = cell->vertex_index(v)+(slice+1)*input.n_vertices();
             }
 
           this_cell.material_id = cell->material_id();
@@ -3428,27 +3428,27 @@ extrude_triangulation(const Triangulation<2, 2> & input,
   types::boundary_id bid=0;
   s.boundary_quads.reserve(input.n_active_lines()*(n_slices-1) + input.n_active_cells()*2);
   for (Triangulation<2,2>::cell_iterator
-      cell = input.begin(); cell != input.end(); ++cell)
+       cell = input.begin(); cell != input.end(); ++cell)
     {
       CellData<2> quad;
-      for (unsigned int f=0; f<4;++f)
+      for (unsigned int f=0; f<4; ++f)
         if (cell->at_boundary(f))
           {
             quad.boundary_id = cell->face(f)->boundary_indicator();
             bid = std::max(bid, quad.boundary_id);
-          for (unsigned int slice=0;slice<n_slices-1;++slice)
-            {
-              quad.vertices[0] = cell->face(f)->vertex_index(0)+slice*input.n_vertices();
-              quad.vertices[1] = cell->face(f)->vertex_index(1)+slice*input.n_vertices();
-              quad.vertices[2] = cell->face(f)->vertex_index(0)+(slice+1)*input.n_vertices();
-              quad.vertices[3] = cell->face(f)->vertex_index(1)+(slice+1)*input.n_vertices();
-              s.boundary_quads.push_back(quad);
-            }
+            for (unsigned int slice=0; slice<n_slices-1; ++slice)
+              {
+                quad.vertices[0] = cell->face(f)->vertex_index(0)+slice*input.n_vertices();
+                quad.vertices[1] = cell->face(f)->vertex_index(1)+slice*input.n_vertices();
+                quad.vertices[2] = cell->face(f)->vertex_index(0)+(slice+1)*input.n_vertices();
+                quad.vertices[3] = cell->face(f)->vertex_index(1)+(slice+1)*input.n_vertices();
+                s.boundary_quads.push_back(quad);
+              }
           }
     }
 
   for (Triangulation<2,2>::cell_iterator
-      cell = input.begin(); cell != input.end(); ++cell)
+       cell = input.begin(); cell != input.end(); ++cell)
     {
       CellData<2> quad;
       quad.boundary_id = bid + 1;
@@ -3459,7 +3459,7 @@ extrude_triangulation(const Triangulation<2, 2> & input,
       s.boundary_quads.push_back(quad);
 
       quad.boundary_id = bid + 2;
-      for (int i=0;i<4;++i)
+      for (int i=0; i<4; ++i)
         quad.vertices[i] += (n_slices-1)*input.n_vertices();
       s.boundary_quads.push_back(quad);
     }

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.