From 47e765ce21dec4d998e430815a8db2aac6e3c78c Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 18 Feb 2021 14:07:00 -0700 Subject: [PATCH] Remove the internal::ReferenceCell::Base class and derived classes. --- include/deal.II/grid/reference_cell.h | 1151 ----------------- include/deal.II/grid/tria_accessor.h | 8 - .../deal.II/grid/tria_accessor.templates.h | 13 - 3 files changed, 1172 deletions(-) diff --git a/include/deal.II/grid/reference_cell.h b/include/deal.II/grid/reference_cell.h index 9afa30c311..8879070573 100644 --- a/include/deal.II/grid/reference_cell.h +++ b/include/deal.II/grid/reference_cell.h @@ -1770,1157 +1770,6 @@ ReferenceCell::combine_face_and_line_orientation( } -namespace internal -{ - /** - * A namespace for geometric information on reference cells. - */ - namespace ReferenceCell - { - /** - * Interface to be used in TriaAccessor/TriaCellAccessor to access - * sub-entities of dimension d' of geometric entities of dimension d, with - * 0<=d' - vertex_indices() const - { - return {0U, n_vertices()}; - } - - /** - * Return an object that can be thought of as an array containing all - * indices from zero to n_lines(). - */ - inline std_cxx20::ranges::iota_view - line_indices() const - { - return {0U, n_lines()}; - } - - /** - * Return an object that can be thought of as an array containing all - * indices from zero to n_faces(). - */ - inline std_cxx20::ranges::iota_view - face_indices() const - { - return {0U, n_faces()}; - } - - /** - * Standard decomposition of vertex index into face and face-vertex - * index. - */ - virtual std::array - standard_vertex_to_face_and_vertex_index(const unsigned int vertex) const - { - Assert(false, ExcNotImplemented()); - - (void)vertex; - - return {{0u, 0u}}; - } - - /** - * Standard decomposition of line index into face and face-line index. - */ - virtual std::array - standard_line_to_face_and_line_index(const unsigned int line) const - { - Assert(false, ExcNotImplemented()); - - (void)line; - - return {{0, 0}}; - } - - /** - * Correct vertex index depending on face orientation. - */ - virtual unsigned int - standard_to_real_face_vertex(const unsigned int vertex, - const unsigned int face, - const unsigned char face_orientation) const - { - Assert(false, ExcNotImplemented()); - - (void)vertex; - (void)face; - (void)face_orientation; - - return 0; - } - - /** - * Correct line index depending on face orientation. - */ - virtual unsigned int - standard_to_real_face_line(const unsigned int line, - const unsigned int face, - const unsigned char face_orientation) const - { - Assert(false, ExcNotImplemented()); - - (void)line; - (void)face; - (void)face_orientation; - - return 0; - } - - /** - * Combine face and line orientation. - */ - virtual bool - combine_face_and_line_orientation( - const unsigned int line, - const unsigned char face_orientation, - const unsigned char line_orientation) const - { - Assert(false, ExcNotImplemented()); - - (void)line; - (void)face_orientation; - (void)line_orientation; - - return true; - } - - /** - * Return reference-cell type of face @p face_no. - */ - virtual dealii::ReferenceCell - face_reference_cell(const unsigned int face_no) const - { - Assert(false, ExcNotImplemented()); - (void)face_no; - - return ReferenceCells::Invalid; - } - - /** - * Map face line number to cell line number. - */ - virtual unsigned int - face_to_cell_lines(const unsigned int face, - const unsigned int line, - const unsigned char face_orientation) const - { - Assert(false, ExcNotImplemented()); - (void)face; - (void)line; - (void)face_orientation; - - return 0; - } - - /** - * Map face vertex number to cell vertex number. - */ - virtual unsigned int - face_to_cell_vertices(const unsigned int face, - const unsigned int vertex, - const unsigned char face_orientation) const - { - Assert(false, ExcNotImplemented()); - (void)face; - (void)vertex; - (void)face_orientation; - - return 0; - } - - /** - * Map an ExodusII vertex number to a deal.II vertex number. - */ - virtual unsigned int - exodusii_vertex_to_deal_vertex(const unsigned int vertex_n) const - { - Assert(false, ExcNotImplemented()); - (void)vertex_n; - - return 0; - } - - /** - * Map an ExodusII face number to a deal.II face number. - */ - virtual unsigned int - exodusii_face_to_deal_face(const unsigned int face_n) const - { - Assert(false, ExcNotImplemented()); - (void)face_n; - - return 0; - } - - /** - * Indices of child cells that are adjacent to a certain face of the - * mother cell. - */ - virtual unsigned int - child_cell_on_face(const unsigned int face_n, - const unsigned int subface_n) const - { - Assert(false, ExcNotImplemented()); - (void)face_n; - (void)subface_n; - - return numbers::invalid_unsigned_int; - } - }; - - - /** - * Base class for tensor-product geometric entities. - */ - template - struct TensorProductBase : Base - { - unsigned int - n_vertices() const override - { - return GeometryInfo::vertices_per_cell; - } - - unsigned int - n_lines() const override - { - return GeometryInfo::lines_per_cell; - } - - unsigned int - n_faces() const override - { - return GeometryInfo::faces_per_cell; - } - - unsigned int - face_to_cell_lines(const unsigned int face, - const unsigned int line, - const unsigned char face_orientation) const override - { - return GeometryInfo::face_to_cell_lines( - face, - line, - Utilities::get_bit(face_orientation, 0), - Utilities::get_bit(face_orientation, 2), - Utilities::get_bit(face_orientation, 1)); - } - - unsigned int - face_to_cell_vertices(const unsigned int face, - const unsigned int vertex, - const unsigned char face_orientation) const override - { - return GeometryInfo::face_to_cell_vertices( - face, - vertex, - Utilities::get_bit(face_orientation, 0), - Utilities::get_bit(face_orientation, 2), - Utilities::get_bit(face_orientation, 1)); - } - }; - - - - /* - * Vertex. - */ - struct Vertex : public TensorProductBase<0> - { - dealii::ReferenceCell - face_reference_cell(const unsigned int face_no) const override - { - (void)face_no; - return ReferenceCells::Invalid; - } - - virtual unsigned int - exodusii_face_to_deal_face(const unsigned int face_n) const override - { - (void)face_n; - AssertIndexRange(face_n, n_faces()); - - return 0; - } - }; - - - - /* - * Line. - */ - struct Line : public TensorProductBase<1> - { - dealii::ReferenceCell - face_reference_cell(const unsigned int face_no) const override - { - (void)face_no; - return ReferenceCells::Vertex; - } - - virtual unsigned int - exodusii_vertex_to_deal_vertex(const unsigned int vertex_n) const override - { - AssertIndexRange(vertex_n, n_vertices()); - return vertex_n; - } - - virtual unsigned int - exodusii_face_to_deal_face(const unsigned int face_n) const override - { - AssertIndexRange(face_n, n_faces()); - return face_n; - } - }; - - - - /** - * Triangle. - */ - struct Triangle : public Base - { - unsigned int - n_vertices() const override - { - return 3; - } - - unsigned int - n_lines() const override - { - return 3; - } - - unsigned int - n_faces() const override - { - return this->n_lines(); - } - - std::array - standard_vertex_to_face_and_vertex_index( - const unsigned int vertex) const override - { - AssertIndexRange(vertex, 3); - - static const std::array, 3> table = { - {{{0, 0}}, {{0, 1}}, {{1, 1}}}}; - - return table[vertex]; - } - - unsigned int - standard_to_real_face_vertex( - const unsigned int vertex, - const unsigned int face, - const unsigned char line_orientation) const override - { - (void)face; - - static const std::array, 2> table = { - {{{1, 0}}, {{0, 1}}}}; - - return table[line_orientation][vertex]; - } - - dealii::ReferenceCell - face_reference_cell(const unsigned int face_no) const override - { - (void)face_no; - - AssertIndexRange(face_no, n_faces()); - - return dealii::ReferenceCells::Line; - } - - unsigned int - face_to_cell_lines(const unsigned int face, - const unsigned int line, - const unsigned char face_orientation) const override - { - AssertIndexRange(face, n_faces()); - AssertDimension(line, 0); - - (void)line; - (void)face_orientation; - - return face; - } - - unsigned int - face_to_cell_vertices(const unsigned int face, - const unsigned int vertex, - const unsigned char face_orientation) const override - { - static const std::array, 3> table = { - {{{0, 1}}, {{1, 2}}, {{2, 0}}}}; - - return table[face][face_orientation ? vertex : (1 - vertex)]; - } - - virtual unsigned int - exodusii_vertex_to_deal_vertex(const unsigned int vertex_n) const override - { - AssertIndexRange(vertex_n, n_vertices()); - return vertex_n; - } - - virtual unsigned int - exodusii_face_to_deal_face(const unsigned int face_n) const override - { - AssertIndexRange(face_n, n_faces()); - return face_n; - } - - virtual unsigned int - child_cell_on_face(const unsigned int face_n, - const unsigned int subface_n) const override - { - static constexpr unsigned int subcells[3][2] = {{0, 1}, {1, 2}, {2, 0}}; - - return subcells[face_n][subface_n]; - } - }; - - - - /** - * Quadrilateral - */ - struct Quadrilateral : public TensorProductBase<2> - { - std::array - standard_vertex_to_face_and_vertex_index( - const unsigned int vertex) const override - { - return GeometryInfo<2>::standard_quad_vertex_to_line_vertex_index( - vertex); - } - - unsigned int - standard_to_real_face_vertex( - const unsigned int vertex, - const unsigned int face, - const unsigned char line_orientation) const override - { - (void)face; - - return GeometryInfo<2>::standard_to_real_line_vertex(vertex, - line_orientation); - } - - dealii::ReferenceCell - face_reference_cell(const unsigned int face_no) const override - { - (void)face_no; - return dealii::ReferenceCells::Line; - } - - virtual unsigned int - exodusii_vertex_to_deal_vertex(const unsigned int vertex_n) const override - { - AssertIndexRange(vertex_n, n_vertices()); - constexpr std::array exodus_to_deal{{0, 1, 3, 2}}; - return exodus_to_deal[vertex_n]; - } - - virtual unsigned int - exodusii_face_to_deal_face(const unsigned int face_n) const override - { - AssertIndexRange(face_n, n_faces()); - constexpr std::array exodus_to_deal{{2, 1, 3, 0}}; - return exodus_to_deal[face_n]; - } - }; - - - - /** - * Tetrahedron - */ - struct Tetrahedron : public Base - { - unsigned int - n_vertices() const override - { - return 4; - } - - unsigned int - n_lines() const override - { - return 6; - } - - unsigned int - n_faces() const override - { - return 4; - } - - std::array - standard_line_to_face_and_line_index( - const unsigned int line) const override - { - static const std::array table[6] = { - {{0, 0}}, {{0, 1}}, {{0, 2}}, {{1, 1}}, {{1, 2}}, {{2, 1}}}; - - return table[line]; - } - - unsigned int - standard_to_real_face_line( - const unsigned int line, - const unsigned int face, - const unsigned char face_orientation) const override - { - (void)face; - - static const std::array, 6> table = { - {{{2, 1, 0}}, - {{0, 1, 2}}, - {{1, 0, 2}}, - {{1, 2, 0}}, - {{0, 2, 1}}, - {{2, 0, 1}}}}; - - return table[face_orientation][line]; - } - - bool - combine_face_and_line_orientation( - const unsigned int line, - const unsigned char face_orientation_raw, - const unsigned char line_orientation) const override - { - (void)line; - (void)face_orientation_raw; - - return line_orientation; - } - - std::array - standard_vertex_to_face_and_vertex_index( - const unsigned int vertex) const override - { - AssertIndexRange(vertex, 4); - - static const std::array table[4] = {{{0, 0}}, - {{0, 1}}, - {{0, 2}}, - {{1, 2}}}; - - return table[vertex]; - } - - unsigned int - standard_to_real_face_vertex( - const unsigned int vertex, - const unsigned int face, - const unsigned char face_orientation) const override - { - AssertIndexRange(face_orientation, 6); - (void)face; - - static const std::array, 6> table = { - {{{0, 2, 1}}, - {{0, 1, 2}}, - {{2, 1, 0}}, - {{1, 2, 0}}, - {{1, 0, 2}}, - {{2, 0, 1}}}}; - - return table[face_orientation][vertex]; - } - - dealii::ReferenceCell - face_reference_cell(const unsigned int face_no) const override - { - (void)face_no; - - AssertIndexRange(face_no, n_faces()); - - return dealii::ReferenceCells::Triangle; - } - - unsigned int - face_to_cell_lines(const unsigned int face, - const unsigned int line, - const unsigned char face_orientation) const override - { - AssertIndexRange(face, n_faces()); - - const static std::array, 4> table = { - {{{0, 1, 2}}, {{0, 3, 4}}, {{2, 5, 3}}, {{1, 4, 5}}}}; - - return table[face] - [standard_to_real_face_line(line, face, face_orientation)]; - } - - unsigned int - face_to_cell_vertices(const unsigned int face, - const unsigned int vertex, - const unsigned char face_orientation) const override - { - static const std::array, 4> table = { - {{{0, 1, 2}}, {{1, 0, 3}}, {{0, 2, 3}}, {{2, 1, 3}}}}; - - return table[face][standard_to_real_face_vertex( - vertex, face, face_orientation)]; - } - - virtual unsigned int - exodusii_vertex_to_deal_vertex(const unsigned int vertex_n) const override - { - AssertIndexRange(vertex_n, n_vertices()); - return vertex_n; - } - - virtual unsigned int - exodusii_face_to_deal_face(const unsigned int face_n) const override - { - AssertIndexRange(face_n, n_faces()); - constexpr std::array exodus_to_deal{{1, 3, 2, 0}}; - return exodus_to_deal[face_n]; - } - }; - - - - /** - * Pyramid. - */ - struct Pyramid : public Base - { - unsigned int - n_vertices() const override - { - return 5; - } - - unsigned int - n_lines() const override - { - return 8; - } - - unsigned int - n_faces() const override - { - return 5; - } - - std::array - standard_line_to_face_and_line_index( - const unsigned int line) const override - { - static const std::array table[8] = {{{0, 0}}, - {{0, 1}}, - {{0, 2}}, - {{0, 3}}, - {{1, 2}}, - {{2, 1}}, - {{1, 1}}, - {{2, 2}}}; - - return table[line]; - } - - unsigned int - standard_to_real_face_line( - const unsigned int line, - const unsigned int face, - const unsigned char face_orientation) const override - { - if (face == 0) // The quadrilateral face - { - return GeometryInfo<3>::standard_to_real_face_line( - line, - Utilities::get_bit(face_orientation, 0), - Utilities::get_bit(face_orientation, 2), - Utilities::get_bit(face_orientation, 1)); - } - else // One of the triangular faces - { - static const std::array, 6> table = { - {{{2, 1, 0}}, - {{0, 1, 2}}, - {{1, 0, 2}}, - {{1, 2, 0}}, - {{0, 2, 1}}, - {{2, 0, 1}}}}; - - return table[face_orientation][line]; - } - } - - bool - combine_face_and_line_orientation( - const unsigned int line, - const unsigned char face_orientation_raw, - const unsigned char line_orientation) const override - { - (void)line; - (void)face_orientation_raw; - - return line_orientation; - } - - std::array - standard_vertex_to_face_and_vertex_index( - const unsigned int vertex) const override - { - static const std::array table[5] = { - {{0, 0}}, {{0, 1}}, {{0, 2}}, {{0, 3}}, {{1, 2}}}; - - return table[vertex]; - } - - unsigned int - standard_to_real_face_vertex( - const unsigned int vertex, - const unsigned int face, - const unsigned char face_orientation) const override - { - if (face == 0) // The one quadrilateral face - { - return GeometryInfo<3>::standard_to_real_face_vertex( - vertex, - Utilities::get_bit(face_orientation, 0), - Utilities::get_bit(face_orientation, 2), - Utilities::get_bit(face_orientation, 1)); - } - else // One of the triangular faces - { - static const std::array, 6> table = { - {{{0, 2, 1}}, - {{0, 1, 2}}, - {{2, 1, 0}}, - {{1, 2, 0}}, - {{1, 0, 2}}, - {{2, 0, 1}}}}; - - return table[face_orientation][vertex]; - } - } - - dealii::ReferenceCell - face_reference_cell(const unsigned int face_no) const override - { - AssertIndexRange(face_no, n_faces()); - - if (face_no == 0) - return dealii::ReferenceCells::Quadrilateral; - else - return dealii::ReferenceCells::Triangle; - } - - 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)]; - } - - virtual unsigned int - exodusii_vertex_to_deal_vertex(const unsigned int vertex_n) const override - { - AssertIndexRange(vertex_n, n_vertices()); - constexpr std::array exodus_to_deal{{0, 1, 3, 2, 4}}; - return exodus_to_deal[vertex_n]; - } - - virtual unsigned int - exodusii_face_to_deal_face(const unsigned int face_n) const override - { - AssertIndexRange(face_n, n_faces()); - constexpr std::array exodus_to_deal{{3, 2, 4, 1, 0}}; - return exodus_to_deal[face_n]; - } - }; - - - - /** - * Wedge. - */ - struct Wedge : public Base - { - unsigned int - n_vertices() const override - { - return 6; - } - - unsigned int - n_lines() const override - { - return 9; - } - - unsigned int - n_faces() const override - { - return 5; - } - - std::array - standard_line_to_face_and_line_index( - const unsigned int line) const override - { - static const std::array table[9] = {{{0, 0}}, - {{0, 2}}, - {{0, 1}}, - {{1, 0}}, - {{1, 1}}, - {{1, 2}}, - {{2, 0}}, - {{2, 1}}, - {{3, 1}}}; - - return table[line]; - } - - unsigned int - standard_to_real_face_line( - const unsigned int line, - const unsigned int face, - const unsigned char face_orientation) const override - { - if (face > 1) // One of the quadrilateral faces - { - return GeometryInfo<3>::standard_to_real_face_line( - line, - Utilities::get_bit(face_orientation, 0), - Utilities::get_bit(face_orientation, 2), - Utilities::get_bit(face_orientation, 1)); - } - else // One of the triangular faces - { - static const std::array, 6> table = { - {{{2, 1, 0}}, - {{0, 1, 2}}, - {{1, 0, 2}}, - {{1, 2, 0}}, - {{0, 2, 1}}, - {{2, 0, 1}}}}; - - return table[face_orientation][line]; - } - } - - bool - combine_face_and_line_orientation( - const unsigned int line, - const unsigned char face_orientation_raw, - const unsigned char line_orientation) const override - { - (void)line; - (void)face_orientation_raw; - - return line_orientation; - } - - std::array - standard_vertex_to_face_and_vertex_index( - const unsigned int vertex) const override - { - static const std::array, 6> table = { - {{{0, 1}}, {{0, 0}}, {{0, 2}}, {{1, 0}}, {{1, 1}}, {{1, 2}}}}; - - return table[vertex]; - } - - unsigned int - standard_to_real_face_vertex( - const unsigned int vertex, - const unsigned int face, - const unsigned char face_orientation) const override - { - if (face > 1) // One of the quadrilateral faces - { - return GeometryInfo<3>::standard_to_real_face_vertex( - vertex, - Utilities::get_bit(face_orientation, 0), - Utilities::get_bit(face_orientation, 2), - Utilities::get_bit(face_orientation, 1)); - } - else // One of the triangular faces - { - static const std::array, 6> table = { - {{{0, 2, 1}}, - {{0, 1, 2}}, - {{2, 1, 0}}, - {{1, 2, 0}}, - {{1, 0, 2}}, - {{2, 0, 1}}}}; - - return table[face_orientation][vertex]; - } - } - - dealii::ReferenceCell - face_reference_cell(const unsigned int face_no) const override - { - AssertIndexRange(face_no, n_faces()); - - if (face_no > 1) - return dealii::ReferenceCells::Quadrilateral; - else - return dealii::ReferenceCells::Triangle; - } - - 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)]; - } - - virtual unsigned int - exodusii_vertex_to_deal_vertex(const unsigned int vertex_n) const override - { - AssertIndexRange(vertex_n, n_vertices()); - constexpr std::array exodus_to_deal{ - {2, 1, 0, 5, 4, 3}}; - return exodus_to_deal[vertex_n]; - } - - virtual unsigned int - exodusii_face_to_deal_face(const unsigned int face_n) const override - { - AssertIndexRange(face_n, n_faces()); - constexpr std::array exodus_to_deal{{3, 4, 2, 0, 1}}; - return exodus_to_deal[face_n]; - } - }; - - - - /** - * Hex. - */ - struct Hexahedron : public TensorProductBase<3> - { - std::array - standard_line_to_face_and_line_index( - const unsigned int line) const override - { - return GeometryInfo<3>::standard_hex_line_to_quad_line_index(line); - } - - unsigned int - standard_to_real_face_line( - const unsigned int line, - const unsigned int face, - const unsigned char face_orientation) const override - { - (void)face; - - return GeometryInfo<3>::standard_to_real_face_line( - line, - Utilities::get_bit(face_orientation, 0), - Utilities::get_bit(face_orientation, 2), - Utilities::get_bit(face_orientation, 1)); - } - - bool - combine_face_and_line_orientation( - const unsigned int line, - const unsigned char face_orientation_raw, - const unsigned char line_orientation) const override - { - static const bool bool_table[2][2][2][2] = { - {{{true, false}, // lines 0/1, face_orientation=false, - // face_flip=false, face_rotation=false and true - {false, true}}, // lines 0/1, face_orientation=false, - // face_flip=true, face_rotation=false and true - {{true, true}, // lines 0/1, face_orientation=true, - // face_flip=false, face_rotation=false and true - {false, false}}}, // lines 0/1, face_orientation=true, - // face_flip=true, face_rotation=false and true - - {{{true, true}, // lines 2/3 ... - {false, false}}, - {{true, false}, {false, true}}}}; - - const bool face_orientation = - Utilities::get_bit(face_orientation_raw, 0); - const bool face_flip = Utilities::get_bit(face_orientation_raw, 2); - const bool face_rotation = Utilities::get_bit(face_orientation_raw, 1); - - return ( - static_cast(line_orientation) == - bool_table[line / 2][face_orientation][face_flip][face_rotation]); - } - - std::array - standard_vertex_to_face_and_vertex_index( - const unsigned int vertex) const override - { - return GeometryInfo<3>::standard_hex_vertex_to_quad_vertex_index( - vertex); - } - - unsigned int - standard_to_real_face_vertex( - const unsigned int vertex, - const unsigned int face, - const unsigned char face_orientation) const override - { - (void)face; - - return GeometryInfo<3>::standard_to_real_face_vertex( - vertex, - Utilities::get_bit(face_orientation, 0), - Utilities::get_bit(face_orientation, 2), - Utilities::get_bit(face_orientation, 1)); - } - - dealii::ReferenceCell - face_reference_cell(const unsigned int face_no) const override - { - (void)face_no; - return dealii::ReferenceCells::Quadrilateral; - } - - virtual unsigned int - exodusii_vertex_to_deal_vertex(const unsigned int vertex_n) const override - { - AssertIndexRange(vertex_n, n_vertices()); - constexpr std::array exodus_to_deal{ - {0, 1, 3, 2, 4, 5, 7, 6}}; - return exodus_to_deal[vertex_n]; - } - - virtual unsigned int - exodusii_face_to_deal_face(const unsigned int face_n) const override - { - AssertIndexRange(face_n, n_faces()); - constexpr std::array exodus_to_deal{ - {2, 1, 3, 0, 4, 5}}; - return exodus_to_deal[face_n]; - } - }; - - /** - * Return for a given reference-cell type the right Info. - */ - inline const internal::ReferenceCell::Base & - get_cell(const dealii::ReferenceCell &type) - { - static const std::array, 8> - gei{{std::make_unique(), - std::make_unique(), - std::make_unique(), - std::make_unique(), - std::make_unique(), - std::make_unique(), - std::make_unique(), - std::make_unique()}}; - AssertIndexRange(static_cast(type), 8); - return *gei[static_cast(type)]; - } - - /** - * Return for a given reference-cell type @p and face number @p face_no the - * right Info of the @p face_no-th face. - */ - inline const internal::ReferenceCell::Base & - get_face(const dealii::ReferenceCell &type, const unsigned int face_no) - { - return get_cell(type.face_reference_cell(face_no)); - } - - } // namespace ReferenceCell -} // namespace internal - - namespace internal { diff --git a/include/deal.II/grid/tria_accessor.h b/include/deal.II/grid/tria_accessor.h index c5abbb5757..44b50b94c4 100644 --- a/include/deal.II/grid/tria_accessor.h +++ b/include/deal.II/grid/tria_accessor.h @@ -1688,14 +1688,6 @@ public: * @} */ -protected: - /** - * Return additional information related to the current geometric entity - * type. - */ - inline const internal::ReferenceCell::Base & - reference_cell_info() const; - private: /** * Like set_boundary_id but without checking for internal faces or invalid diff --git a/include/deal.II/grid/tria_accessor.templates.h b/include/deal.II/grid/tria_accessor.templates.h index 3267b39d12..25831589c2 100644 --- a/include/deal.II/grid/tria_accessor.templates.h +++ b/include/deal.II/grid/tria_accessor.templates.h @@ -2247,19 +2247,6 @@ TriaAccessor::face_indices() const -template -inline const internal::ReferenceCell::Base & -TriaAccessor::reference_cell_info() const -{ - if (structdim == 0) - return internal::ReferenceCell::get_cell(ReferenceCells::Vertex); - else if (structdim == 1) - return internal::ReferenceCell::get_cell(ReferenceCells::Line); - else - return internal::ReferenceCell::get_cell(this->reference_cell()); -} - - /*----------------- Functions: TriaAccessor<0,dim,spacedim> -----------------*/ template -- 2.39.5