]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make some often used arrays static.
authorRalf Hartmann <Ralf.Hartmann@dlr.de>
Mon, 29 Jan 2001 15:30:39 +0000 (15:30 +0000)
committerRalf Hartmann <Ralf.Hartmann@dlr.de>
Mon, 29 Jan 2001 15:30:39 +0000 (15:30 +0000)
git-svn-id: https://svn.dealii.org/trunk@3824 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/grid/geometry_info.h

index 2146aec2694c0549de54e9d1f84e307f9457e3fc..e4a600482e01ba00172919f0bf9513211ee47483 100644 (file)
@@ -205,10 +205,10 @@ GeometryInfo<2>::child_cell_on_face (const unsigned int face,
   Assert (face<faces_per_cell, ExcIndexRange(face, 0, faces_per_cell));
   Assert (subface<subfaces_per_face, ExcIndexRange(subface, 0, subfaces_per_face));
   
-  const unsigned subcells[faces_per_cell][subfaces_per_face] = {{0,1},
-                                                               {1,2},
-                                                               {3,2},
-                                                               {0,3}};
+  static const unsigned subcells[faces_per_cell][subfaces_per_face] = {{0,1},
+                                                                      {1,2},
+                                                                      {3,2},
+                                                                      {0,3}};
   return subcells[face][subface];
 };
 
@@ -221,12 +221,12 @@ unsigned int GeometryInfo<3>::child_cell_on_face (const unsigned int face,
   Assert (face<faces_per_cell, ExcIndexRange(face, 0, faces_per_cell));
   Assert (subface<subfaces_per_face, ExcIndexRange(subface, 0, subfaces_per_face));
   
-  const unsigned subcells[faces_per_cell][subfaces_per_face] = {{0, 1, 2, 3},
-                                                               {4, 5, 6, 7},
-                                                               {0, 1, 5, 4},
-                                                               {1, 5, 6, 2},
-                                                               {3, 2, 6, 7},
-                                                               {0, 4, 7, 3}};
+  static const unsigned subcells[faces_per_cell][subfaces_per_face] = {{0, 1, 2, 3},
+                                                                      {4, 5, 6, 7},
+                                                                      {0, 1, 5, 4},
+                                                                      {1, 5, 6, 2},
+                                                                      {3, 2, 6, 7},
+                                                                      {0, 4, 7, 3}};
   return subcells[face][subface];
 };
 

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.