static std::array<unsigned int, vertices_per_cell>
vertex_indices();
+ /**
+ * Map face vertex number to cell vertex number, i.e. give the cell vertex
+ * number of the <tt>vertex</tt>th vertex of face <tt>face</tt>, e.g.
+ * <tt>GeometryInfo<2>::face_to_cell_vertices(3,0)=2</tt>, see the image
+ * under point N4 in the 2d section of this class's documentation.
+ *
+ * Through the <tt>face_orientation</tt>, <tt>face_flip</tt> and
+ * <tt>face_rotation</tt> arguments this function handles faces oriented in
+ * the standard and non-standard orientation. <tt>face_orientation</tt>
+ * defaults to <tt>true</tt>, <tt>face_flip</tt> and <tt>face_rotation</tt>
+ * default to <tt>false</tt> (standard orientation). In 2d only
+ * <tt>face_flip</tt> is considered. See this
+ * @ref GlossFaceOrientation "glossary"
+ * article for more information.
+ *
+ * As the children of a cell are ordered according to the vertices of the
+ * cell, this call is passed down to the child_cell_on_face() function.
+ * Hence this function is simply a wrapper of child_cell_on_face() giving it
+ * a suggestive name.
+ *
+ * Of course, since this class is for the case `dim==0`, this function
+ * is not implemented.
+ */
+ static unsigned int
+ face_to_cell_vertices(const unsigned int face,
+ const unsigned int vertex,
+ const bool face_orientation = true,
+ const bool face_flip = false,
+ const bool face_rotation = false);
+
+ /**
+ * Map face line number to cell line number, i.e. give the cell line number
+ * of the <tt>line</tt>th line of face <tt>face</tt>, e.g.
+ * <tt>GeometryInfo<3>::face_to_cell_lines(5,0)=4</tt>.
+ *
+ * Through the <tt>face_orientation</tt>, <tt>face_flip</tt> and
+ * <tt>face_rotation</tt> arguments this function handles faces oriented in
+ * the standard and non-standard orientation. <tt>face_orientation</tt>
+ * defaults to <tt>true</tt>, <tt>face_flip</tt> and <tt>face_rotation</tt>
+ * default to <tt>false</tt> (standard orientation) and has no effect in 2d.
+ *
+ * Of course, since this class is for the case `dim==0`, this function
+ * is not implemented.
+ */
+ static unsigned int
+ face_to_cell_lines(const unsigned int face,
+ const unsigned int line,
+ const bool face_orientation = true,
+ const bool face_flip = false,
+ const bool face_rotation = false);
+
/**
* Number of vertices each face has. Since this is not useful in one
* dimension, we provide a useless number (in the hope that a compiler may
+inline unsigned int
+GeometryInfo<0>::face_to_cell_lines(const unsigned int,
+ const unsigned int,
+ const bool,
+ const bool,
+ const bool)
+{
+ Assert(false, ExcNotImplemented());
+ return numbers::invalid_unsigned_int;
+}
+
+
+
template <int dim>
inline unsigned int
GeometryInfo<dim>::face_to_cell_lines(const unsigned int,
+inline unsigned int
+GeometryInfo<0>::face_to_cell_vertices(const unsigned int,
+ const unsigned int,
+ const bool,
+ const bool,
+ const bool)
+{
+ Assert(false, ExcNotImplemented());
+ return numbers::invalid_unsigned_int;
+}
+
+
+
template <int dim>
inline Point<dim>
GeometryInfo<dim>::project_to_unit_cell(const Point<dim> &q)
return ReferenceCell::Type::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;
+ }
};
{
return GeometryInfo<dim>::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<dim>::face_to_cell_lines(
+ face,
+ line,
+ get_bit(face_orientation, 0),
+ get_bit(face_orientation, 2),
+ 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<dim>::face_to_cell_vertices(
+ face,
+ vertex,
+ get_bit(face_orientation, 0),
+ get_bit(face_orientation, 2),
+ get_bit(face_orientation, 1));
+ }
};
return ReferenceCell::Type::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<std::array<unsigned int, 2>, 3> table = {
+ {{0, 1}, {1, 2}, {2, 0}}};
+
+ return table[face][face_orientation ? vertex : (1 - vertex)];
+ }
};
return ReferenceCell::Type::Tri;
}
+
+ 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<std::array<unsigned int, 3>, 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<std::array<unsigned int, 3>, 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)];
+ }
};
const bool face_flip,
const bool face_rotation) const
{
+ const auto &refence_cell =
+ ReferenceCell::internal::Info::get_cell(this->reference_cell_type());
+
AssertIndexRange(face_index, this->n_dofs_per_face());
- AssertIndexRange(face, GeometryInfo<dim>::faces_per_cell);
+ AssertIndexRange(face, refence_cell.n_faces());
// TODO: we could presumably solve the 3d case below using the
// adjust_quad_dof_index_for_face_orientation_table field. for the
// then get the number of this vertex on the cell and translate
// this to a DoF number on the cell
- return (GeometryInfo<dim>::face_to_cell_vertices(
- face, face_vertex, face_orientation, face_flip, face_rotation) *
+ return (refence_cell.face_to_cell_vertices(face,
+ face_vertex,
+ face_orientation +
+ 2 * face_rotation +
+ 4 * face_flip) *
this->n_dofs_per_vertex() +
dof_index_on_vertex);
}
const unsigned int dof_index_on_line = index % this->n_dofs_per_line();
return (this->get_first_line_index() +
- GeometryInfo<dim>::face_to_cell_lines(
- face, face_line, face_orientation, face_flip, face_rotation) *
+ refence_cell.face_to_cell_lines(face,
+ face_line,
+ face_orientation +
+ 2 * face_rotation +
+ 4 * face_flip) *
this->n_dofs_per_line() +
dof_index_on_line);
}