]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Generalize line_orientation() for 2D general meshes 10635/head
authorPeter Munch <peterrmuench@gmail.com>
Tue, 30 Jun 2020 18:02:47 +0000 (20:02 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Tue, 30 Jun 2020 18:10:12 +0000 (20:10 +0200)
include/deal.II/grid/tria_accessor.templates.h

index a28bc8ea83b72c5eec2116488550a110195a465c..19bf9412fb3b129171bd4a27eb084242073a7669 100644 (file)
@@ -724,10 +724,18 @@ namespace internal
 
       template <int spacedim>
       inline static bool
-      line_orientation(const TriaAccessor<2, 2, spacedim> &, const unsigned int)
+      line_orientation(const TriaAccessor<2, 2, spacedim> &accessor,
+                       const unsigned int                  line)
       {
-        // quads in 2d have no non-standard orientation
-        return true;
+        if (accessor.tria->levels[accessor.present_level]
+              ->face_orientations.size() == 0)
+          return true; // quads in 2d have no non-standard orientation and
+                       // the array TriaLevel::face_orientations is left empty
+        else
+          return accessor.tria->levels[accessor.present_level]
+            ->face_orientations[accessor.present_index *
+                                  GeometryInfo<2>::faces_per_cell +
+                                line];
       }
 
 

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.