From: David Wells Date: Fri, 30 Oct 2020 16:51:24 +0000 (-0400) Subject: Implement face_to_cell_vertices for pyramids and wedges. X-Git-Tag: v9.3.0-rc1~951^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=214319bbafb40b9fcce5c1054e1b49afe4d437ae;p=dealii.git Implement face_to_cell_vertices for pyramids and wedges. --- diff --git a/include/deal.II/grid/reference_cell.h b/include/deal.II/grid/reference_cell.h index 275bf0547c..5dca4d22e7 100644 --- a/include/deal.II/grid/reference_cell.h +++ b/include/deal.II/grid/reference_cell.h @@ -783,11 +783,38 @@ namespace ReferenceCell { AssertIndexRange(face_no, n_faces()); - if (face_no == 1) + if (face_no == 0) return ReferenceCell::Type::Quad; else return ReferenceCell::Type::Tri; } + + unsigned int + face_to_cell_vertices( + const unsigned int face, + const unsigned int vertex, + const unsigned char face_orientation) const override + { + AssertIndexRange(face, n_faces()); + if (face == 0) + { + AssertIndexRange(vertex, 4); + } + else + { + AssertIndexRange(vertex, 3); + } + constexpr auto X = numbers::invalid_unsigned_int; + static const std::array, 5> table = { + {{{0, 1, 2, 3}}, + {{0, 2, 4, X}}, + {{3, 1, 4, X}}, + {{1, 0, 4, X}}, + {{2, 3, 4, X}}}}; + + return table[face][standard_to_real_face_vertex( + vertex, face, face_orientation)]; + } }; @@ -908,6 +935,33 @@ namespace ReferenceCell else return ReferenceCell::Type::Tri; } + + unsigned int + face_to_cell_vertices( + const unsigned int face, + const unsigned int vertex, + const unsigned char face_orientation) const override + { + AssertIndexRange(face, n_faces()); + if (face < 2) + { + AssertIndexRange(vertex, 3); + } + else + { + AssertIndexRange(vertex, 4); + } + constexpr auto X = numbers::invalid_unsigned_int; + static const std::array, 6> table = { + {{{1, 0, 2, X}}, + {{3, 4, 5, X}}, + {{0, 1, 3, 4}}, + {{1, 2, 4, 5}}, + {{2, 0, 5, 3}}}}; + + return table[face][standard_to_real_face_vertex( + vertex, face, face_orientation)]; + } };