]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
More recursion for easy reading, as well as new field
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 17 Feb 1999 17:29:10 +0000 (17:29 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 17 Feb 1999 17:29:10 +0000 (17:29 +0000)
'liens_per_face'.

git-svn-id: https://svn.dealii.org/trunk@835 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 0be10a79d3b32fa87f8d1c1fd11a7b1ed97edbb6..ab243ab2bfc192e87aa73a6cb20972b6629c62db 100644 (file)
@@ -59,7 +59,7 @@ struct GeometryInfo
                                      * Number of children each face has
                                      * when the adjacent cell is refined.
                                      */
-    static const unsigned int subfaces_per_face = ((_dim>1) ? (1<<(_dim-1)) : 0);
+    static const unsigned int subfaces_per_face = ((_dim>1) ? GeometryInfo<_dim-1>::children_per_cell : 0);
 
                                     /**
                                      * Number of vertices a cell has.
@@ -75,8 +75,19 @@ struct GeometryInfo
                                      * #for (i=0; i<vertices_per_face; ++i)#,
                                      * at least if #i# is an #unsigned int#.
                                      */
-    static const unsigned int vertices_per_face = ((_dim>1) ? (1<<(_dim-1)) : 0);
+    static const unsigned int vertices_per_face = ((_dim>1) ? GeometryInfo<_dim-1>::vertices_per_cell : 0);
 
+                                    /**
+                                     * Number of lines each face has.
+                                     * Since this is not useful in one
+                                     * dimension, we provide a useless
+                                     * number (in the hope that a compiler
+                                     * may warn when it sees constructs like
+                                     * #for (i=0; i<lines_per_face; ++i)#,
+                                     * at least if #i# is an #unsigned int#.
+                                     */
+    static const unsigned int lines_per_face = ((_dim>1) ? GeometryInfo<_dim-1>::lines_per_cell : 0);
+    
 
                                     /**
                                      * Number of lines of a cell.

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.