]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Impelment ReferenceCell::internal::Info::Pyramid::standard_to_real_face_line 11323/head
authorPeter Munch <peterrmuench@gmail.com>
Sat, 5 Dec 2020 11:37:42 +0000 (12:37 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Wed, 9 Dec 2020 09:11:03 +0000 (10:11 +0100)
include/deal.II/grid/reference_cell.h

index 5402c73267f2b23eeec4635cfd3aca7614f9accb..87a4cc6c84ae0acf669ca9a8196552db8c68b63b 100644 (file)
@@ -834,19 +834,26 @@ namespace ReferenceCell
           const unsigned int  face,
           const unsigned char face_orientation) const override
         {
-          Assert(false, ExcNotImplemented());
-
-          (void)face;
-
-          static const std::array<std::array<unsigned int, 3>, 6> table = {
-            {{{2, 1, 0}},
-             {{0, 1, 2}},
-             {{1, 2, 0}},
-             {{0, 2, 1}},
-             {{1, 0, 2}},
-             {{2, 0, 1}}}};
+          if (face == 0) // QUAD
+            {
+              return GeometryInfo<3>::standard_to_real_face_line(
+                line,
+                get_bit(face_orientation, 0),
+                get_bit(face_orientation, 2),
+                get_bit(face_orientation, 1));
+            }
+          else // TRI
+            {
+              static const std::array<std::array<unsigned int, 3>, 6> table = {
+                {{{2, 1, 0}},
+                 {{0, 1, 2}},
+                 {{1, 2, 0}},
+                 {{0, 2, 1}},
+                 {{1, 0, 2}},
+                 {{2, 0, 1}}}};
 
-          return table[face_orientation][line];
+              return table[face_orientation][line];
+            }
         }
 
         bool

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.