From: bangerth Date: Thu, 9 Dec 2010 01:40:25 +0000 (+0000) Subject: Document direction flags better. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49aa4b2144cd3e18198d8beba2d999916bc3d71c;p=dealii-svn.git Document direction flags better. git-svn-id: https://svn.dealii.org/trunk@22946 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/doc/doxygen/headers/glossary.h b/deal.II/doc/doxygen/headers/glossary.h index 962881fce7..209bf1f2f4 100644 --- a/deal.II/doc/doxygen/headers/glossary.h +++ b/deal.II/doc/doxygen/headers/glossary.h @@ -334,6 +334,54 @@ * * * + *
@anchor GlossDirectionFlag Direction flags
+ * + *
The direction flag is used in triangulations embedded in a + * higher dimensional space to denote the orientation of cells and make the + * manifold oriented. It is accessed using CellAccessor::direction_flag() + * and set by the Triangulation class upon creation of a triangulation. + * + * The flag is necessary to make cases like this work: assume we have a + * one-dimensional mesh embedded in a two-dimensional space, + * + * @image html direction_flag.png "One dimensional mesh in two dimensions" + * + * In one dimensional meshes in one dimensional space, we can always make sure + * that the location of the left vertex of a cell has a smaller value than the + * location of the right vertex. However, if we embed a mesh in a higher + * dimensional space, we can no longer do this. For example, the cells in the + * mesh above may be described by the following vertex sets: (0,1), + * (1,2), (3,2), (4,3), (4,5). (As a side remark, note that here we + * have vertices -- e.g. vertex 2 -- that are the right end points of more + * than one cell.) If we define the normal to each cell as that unit vector + * that is right perpendicular to the vector that connects the first to the + * second vertex of the line, then we would end up with the following picture: + * + * @image html direction_flag_normals.png "Normal vectors" + * + * In other words, this one-dimensional manifold is not oriented. We could in + * principle revert the order of vertices when creating such a mesh (though + * there are good reasons not to do so, for example because this mesh may have + * resulted from extracting the surface mesh of a two dimensional mesh, and we + * want to preserve the order of vertices of each line segment because they + * currently match the order of vertices of the faces of the 2d cells). An + * alternative strategy, chosen in deal.II, is to simply associate with each + * cell whether the normal should be the left or right normal to the + * cell. (The default is right normals.) In the example above, the flags for + * the five cells would be true, true, false, false, + * true. Multiplying the right normal with plus or minus one, depending + * on the value of the flag on each cell, yields a set of normal vectors that + * orient the manifold. + * + * Similar issues happen with two-dimensional meshes in three space + * dimensions. We note that it would not be possible to find consistent + * direction flags if the two-dimensional manifold is not orientable; such + * manifolds are not currently supported by deal.II, however, and there would + * appear to be little cause for anyone to solve partial differential equations + * on such manifolds in the first place. + *
+ * + * *
@anchor GlossDistorted Distorted cells
* *
A distorted cell is a cell for which the mapping from diff --git a/deal.II/doc/doxygen/images/direction_flag.fig b/deal.II/doc/doxygen/images/direction_flag.fig new file mode 100644 index 0000000000..ee0f36a1fa --- /dev/null +++ b/deal.II/doc/doxygen/images/direction_flag.fig @@ -0,0 +1,16 @@ +#FIG 3.2 Produced by xfig version 3.2.5 +Landscape +Center +Metric +A4 +100.00 +Single +-2 +1200 2 +2 3 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 6 + 1665 3375 2520 4545 4050 4005 4590 2520 2610 2025 1665 3375 +4 0 0 50 -1 19 20 0.0000 4 225 180 2475 4860 0\001 +4 0 0 50 -1 19 20 0.0000 4 225 180 4185 4185 1\001 +4 0 0 50 -1 19 20 0.0000 4 225 180 4680 2520 2\001 +4 0 0 50 -1 19 20 0.0000 4 225 180 2520 1845 3\001 +4 0 0 50 -1 19 20 0.0000 4 225 180 1395 3375 4\001 diff --git a/deal.II/doc/doxygen/images/direction_flag.png b/deal.II/doc/doxygen/images/direction_flag.png new file mode 100644 index 0000000000..42e6852187 Binary files /dev/null and b/deal.II/doc/doxygen/images/direction_flag.png differ diff --git a/deal.II/doc/doxygen/images/direction_flag_normals.fig b/deal.II/doc/doxygen/images/direction_flag_normals.fig new file mode 100644 index 0000000000..7b433bc888 --- /dev/null +++ b/deal.II/doc/doxygen/images/direction_flag_normals.fig @@ -0,0 +1,31 @@ +#FIG 3.2 Produced by xfig version 3.2.5 +Landscape +Center +Metric +A4 +100.00 +Single +-2 +1200 2 +2 3 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 6 + 1665 3375 2520 4545 4050 4005 4590 2520 2610 2025 1665 3375 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 3 1 2.00 60.00 120.00 + 3330 4275 3600 5040 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 3 1 2.00 60.00 120.00 + 4320 3240 5040 3465 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 3 1 2.00 60.00 120.00 + 3510 2250 3330 2925 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 3 1 2.00 60.00 120.00 + 2160 2700 2745 3105 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 3 1 2.00 60.00 120.00 + 2070 3915 1530 4365 +4 0 0 50 -1 19 20 0.0000 4 225 180 2475 4860 0\001 +4 0 0 50 -1 19 20 0.0000 4 225 180 4185 4185 1\001 +4 0 0 50 -1 19 20 0.0000 4 225 180 4680 2520 2\001 +4 0 0 50 -1 19 20 0.0000 4 225 180 2520 1845 3\001 +4 0 0 50 -1 19 20 0.0000 4 225 180 1395 3375 4\001 diff --git a/deal.II/doc/doxygen/images/direction_flag_normals.png b/deal.II/doc/doxygen/images/direction_flag_normals.png new file mode 100644 index 0000000000..7fc6a2ee10 Binary files /dev/null and b/deal.II/doc/doxygen/images/direction_flag_normals.png differ diff --git a/deal.II/doc/doxygen/tutorial/steps.cmapx b/deal.II/doc/doxygen/tutorial/steps.cmapx index 56f83e58d0..c8e88019f8 100644 --- a/deal.II/doc/doxygen/tutorial/steps.cmapx +++ b/deal.II/doc/doxygen/tutorial/steps.cmapx @@ -1,40 +1,39 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deal.II/doc/doxygen/tutorial/steps.png b/deal.II/doc/doxygen/tutorial/steps.png index 44435ded1a..f8919d8dbf 100644 Binary files a/deal.II/doc/doxygen/tutorial/steps.png and b/deal.II/doc/doxygen/tutorial/steps.png differ diff --git a/deal.II/include/deal.II/grid/tria_accessor.h b/deal.II/include/deal.II/grid/tria_accessor.h index 94dbceda5c..9eade028cd 100644 --- a/deal.II/include/deal.II/grid/tria_accessor.h +++ b/deal.II/include/deal.II/grid/tria_accessor.h @@ -2625,6 +2625,8 @@ class CellAccessor : public TriaAccessor * Return the orientation of * this cell. * + * For the meaning of this flag, see + * @ref GlossDirectionFlag . */ bool direction_flag () const; @@ -2813,6 +2815,8 @@ class CellAccessor : public TriaAccessor * Set the orientation of this * cell. * + * For the meaning of this flag, see + * @ref GlossDirectionFlag . */ void set_direction_flag (const bool new_direction_flag) const; /**