]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
information on direction of normal vectors added
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 18 Dec 2004 15:46:54 +0000 (15:46 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 18 Dec 2004 15:46:54 +0000 (15:46 +0000)
git-svn-id: https://svn.dealii.org/trunk@9817 0785d39b-7218-0410-832d-ea1e28bc413d

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

index c6140f4885edf4a3f5e92a7de6e013fffee827f7..026bceb4f6f076cfcf5005879f6bc8b968d32b23 100644 (file)
@@ -122,7 +122,37 @@ struct GeometryInfo
                                      * \end{verbatim}
                                      */
     static const unsigned int dx_to_deal[vertices_per_cell];
+    
+                                    /**
+                                     * For each face of the reference
+                                     * cell, this field stores the
+                                     * coordinate direction in which
+                                     * its normal vector points.
+                                     *
+                                     * Remark that this is only the
+                                     * coordinate number. The acual
+                                     * direction of the normal vector
+                                     * is obtained by multiplying the
+                                     * unit vector in this direction
+                                     * with #unit_normal_orientation.
+                                     */
+    static const unsigned int unit_normal_direction[faces_per_cell];
 
+                                    /**
+                                     * Orientation of the unit normal
+                                     * vector of a face of the
+                                     * reference cell.
+                                     *
+                                     * Each value is either
+                                     * <tt>1</tt> or <tt>-1</tt>,
+                                     * corresponding to a normal
+                                     * vector pointing in the
+                                     * positive or negative
+                                     * coordinate direction,
+                                     * respectively.
+                                     */
+    static const int unit_normal_orientation[faces_per_cell];
+    
                                     /**
                                      * This field store which child cells
                                      * are adjacent to a certain face of
@@ -497,6 +527,36 @@ struct GeometryInfo<1>
                                      */
     static const unsigned int dx_to_deal[vertices_per_cell];
 
+                                    /**
+                                     * For each face of the reference
+                                     * cell, this field stores the
+                                     * coordinate direction in which
+                                     * its normal vector points.
+                                     *
+                                     * Remark that this is only the
+                                     * coordinate number. The acual
+                                     * direction of the normal vector
+                                     * is obtained by multiplying the
+                                     * unit vector in this direction
+                                     * with #unit_normal_orientation.
+                                     */
+    static const unsigned int unit_normal_direction[faces_per_cell];
+
+                                    /**
+                                     * Orientation of the unit normal
+                                     * vector of a face of the
+                                     * reference cell.
+                                     *
+                                     * Each value is either
+                                     * <tt>1</tt> or <tt>-1</tt>,
+                                     * corresponding to a normal
+                                     * vector pointing in the
+                                     * positive or negative
+                                     * coordinate direction,
+                                     * respectively.
+                                     */
+    static const int unit_normal_orientation[faces_per_cell];
+    
                                     /**
                                      * This field store which child cells
                                      * are adjacent to a certain face of
@@ -781,6 +841,36 @@ struct GeometryInfo<2>
                                      */
     static const unsigned int dx_to_deal[vertices_per_cell];
 
+                                    /**
+                                     * For each face of the reference
+                                     * cell, this field stores the
+                                     * coordinate direction in which
+                                     * its normal vector points.
+                                     *
+                                     * Remark that this is only the
+                                     * coordinate number. The acual
+                                     * direction of the normal vector
+                                     * is obtained by multiplying the
+                                     * unit vector in this direction
+                                     * with #unit_normal_orientation.
+                                     */
+    static const unsigned int unit_normal_direction[faces_per_cell];
+
+                                    /**
+                                     * Orientation of the unit normal
+                                     * vector of a face of the
+                                     * reference cell.
+                                     *
+                                     * Each value is either
+                                     * <tt>1</tt> or <tt>-1</tt>,
+                                     * corresponding to a normal
+                                     * vector pointing in the
+                                     * positive or negative
+                                     * coordinate direction,
+                                     * respectively.
+                                     */
+    static const int unit_normal_orientation[faces_per_cell];
+    
                                     /**
                                      * This field store which child cells
                                      * are adjacent to a certain face of
@@ -1067,6 +1157,36 @@ struct GeometryInfo<3>
                                      */
     static const unsigned int dx_to_deal[vertices_per_cell];
 
+                                    /**
+                                     * For each face of the reference
+                                     * cell, this field stores the
+                                     * coordinate direction in which
+                                     * its normal vector points.
+                                     *
+                                     * Remark that this is only the
+                                     * coordinate number. The acual
+                                     * direction of the normal vector
+                                     * is obtained by multiplying the
+                                     * unit vector in this direction
+                                     * with #unit_normal_orientation.
+                                     */
+    static const unsigned int unit_normal_direction[faces_per_cell];
+
+                                    /**
+                                     * Orientation of the unit normal
+                                     * vector of a face of the
+                                     * reference cell.
+                                     *
+                                     * Each value is either
+                                     * <tt>1</tt> or <tt>-1</tt>,
+                                     * corresponding to a normal
+                                     * vector pointing in the
+                                     * positive or negative
+                                     * coordinate direction,
+                                     * respectively.
+                                     */
+    static const int unit_normal_orientation[faces_per_cell];
+    
                                     /**
                                      * This field store which child cells
                                      * are adjacent to a certain face of
index 03c1728aa0a3210d1f32f8f0e5ce5e696d1b2d09..9552c67dc0cc17c38b65a3592cb12a7a18194cd8 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal.II authors
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -77,6 +77,28 @@ const unsigned int GeometryInfo<2>::dx_to_deal[GeometryInfo<2>::vertices_per_cel
 const unsigned int GeometryInfo<3>::dx_to_deal[GeometryInfo<3>::vertices_per_cell]
 = { 0, 3, 4, 7, 1, 2, 5, 6};
 
+//TODO: Use these values in mappings.
+const unsigned int
+GeometryInfo<1>::unit_normal_direction[GeometryInfo<1>::faces_per_cell]
+= { 0, 0 };
+const int
+GeometryInfo<1>::unit_normal_orientation[GeometryInfo<1>::faces_per_cell]
+= { -1, 1 };
+
+const unsigned int
+GeometryInfo<2>::unit_normal_direction[GeometryInfo<2>::faces_per_cell]
+= { 1, 0, 1, 0 };
+const int
+GeometryInfo<2>::unit_normal_orientation[GeometryInfo<2>::faces_per_cell]
+= { -1, 1, 1, -1 };
+
+const unsigned int
+GeometryInfo<3>::unit_normal_direction[GeometryInfo<3>::faces_per_cell]
+= { 1, 1, 2, 0, 2, 0 };
+const int
+GeometryInfo<3>::unit_normal_orientation[GeometryInfo<3>::faces_per_cell]
+= { -1, 1, -1, 1, 1, -1 };
+
 
 
 

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.