]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Introduce TriaAccessor::combined_face_orientation() 12878/head
authorPeter Munch <peterrmuench@gmail.com>
Mon, 25 Oct 2021 04:50:59 +0000 (06:50 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Wed, 27 Oct 2021 16:31:19 +0000 (18:31 +0200)
include/deal.II/grid/tria_accessor.h
include/deal.II/grid/tria_accessor.templates.h
source/numerics/data_out_faces.cc

index 2dbd0270102abb5735ce9279247789bc92e4a984..8e5641cbbcbf778fc1ca682f7c0fb554660267ec 100644 (file)
@@ -899,6 +899,13 @@ public:
    * @{
    */
 
+  /**
+   * Return an integer representation that uniquely encodes the orientation,
+   * flip, and rotation of a @p face.
+   */
+  unsigned char
+  combined_face_orientation(const unsigned int face) const;
+
   /**
    * Return whether the face with index @p face has its normal pointing in the
    * standard direction (@p true) or whether it is the opposite (@p false).
@@ -2104,6 +2111,12 @@ public:
    * @{
    */
 
+  /**
+   * @brief Always return 0
+   */
+  static unsigned char
+  combined_face_orientation(const unsigned int face);
+
   /**
    * @brief Always return false
    */
@@ -2570,6 +2583,12 @@ public:
    * @{
    */
 
+  /**
+   * @brief Always return 0
+   */
+  static unsigned char
+  combined_face_orientation(const unsigned int face);
+
   /**
    * @brief Always return false
    */
index b656d517c50f379ea81223c41bfee9c6e3bb27cb..f19b16feed98f4c6ec24f8e4ca088ed4df0c5b55 100644 (file)
@@ -1188,6 +1188,17 @@ TriaAccessor<structdim, dim, spacedim>::quad_index(const unsigned int i) const
 
 
 
+template <int structdim, int dim, int spacedim>
+inline unsigned char
+TriaAccessor<structdim, dim, spacedim>::combined_face_orientation(
+  const unsigned int face) const
+{
+  return this->face_orientation(face) + 4 * this->face_flip(face) +
+         2 * this->face_rotation(face);
+}
+
+
+
 template <int structdim, int dim, int spacedim>
 inline bool
 TriaAccessor<structdim, dim, spacedim>::face_orientation(
@@ -2527,6 +2538,16 @@ TriaAccessor<0, dim, spacedim>::measure() const
 
 
 
+template <int dim, int spacedim>
+inline unsigned char
+TriaAccessor<0, dim, spacedim>::combined_face_orientation(
+  const unsigned int /*face*/)
+{
+  return 0;
+}
+
+
+
 template <int dim, int spacedim>
 inline bool
 TriaAccessor<0, dim, spacedim>::face_orientation(const unsigned int /*face*/)
@@ -2959,6 +2980,15 @@ TriaAccessor<0, 1, spacedim>::manifold_id() const
 }
 
 
+template <int spacedim>
+inline unsigned char
+TriaAccessor<0, 1, spacedim>::combined_face_orientation(
+  const unsigned int /*face*/)
+{
+  return 0;
+}
+
+
 template <int spacedim>
 inline bool
 TriaAccessor<0, 1, spacedim>::face_orientation(const unsigned int /*face*/)
index aaca186ddc4ca956193a9e7547f309851ef7f54e..bcc04bff84760d8a3428c7b0530e7a147c883e22 100644 (file)
@@ -117,11 +117,7 @@ DataOutFaces<dim, spacedim>::build_one_patch(
       const Point<dim> vertex_reference_coordinates =
         cell->reference_cell().template vertex<dim>(
           cell->reference_cell().face_to_cell_vertices(
-            face_number,
-            vertex,
-            cell->face_orientation(face_number) +
-              4 * cell->face_flip(face_number) +
-              2 * cell->face_rotation(face_number)));
+            face_number, vertex, cell->combined_face_orientation(face_number)));
 
       const Point<dim> vertex_real_coordinates =
         data.mapping_collection[0].transform_unit_to_real_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.