const bool face_rotation,
const unsigned int n_quadrature_points)
{
+ const unsigned char combined_orientation =
+ internal::combined_face_orientation(face_orientation,
+ face_rotation,
+ face_flip);
+ // TODO: once we move to representing the default orientation as 0 (instead of
+ // 1) we can get rid of the dim = 1 check
+ Assert(dim == 1 ||
+ (combined_orientation < reference_cell.n_face_orientations(face_no)),
+ ExcInternalError());
if (reference_cell == ReferenceCells::Triangle ||
reference_cell == ReferenceCells::Tetrahedron)
{
if (dim == 2)
- return {(2 * face_no + (face_orientation ? 1 : 0)) *
+ return {(2 * face_no +
+ (combined_orientation ==
+ ReferenceCell::default_combined_face_orientation() ?
+ 1 :
+ 0)) *
n_quadrature_points};
else if (dim == 3)
{
- const unsigned char orientation =
- internal::combined_face_orientation(face_orientation,
- face_rotation,
- face_flip);
- Assert(orientation < 6, ExcInternalError());
return {(reference_cell.n_face_orientations(face_no) * face_no +
- orientation) *
+ combined_orientation) *
n_quadrature_points};
}
}
{
unsigned int offset = 0;
+ const unsigned char combined_orientation =
+ internal::combined_face_orientation(face_orientation,
+ face_rotation,
+ face_flip);
+ Assert(combined_orientation < reference_cell.n_face_orientations(face_no),
+ ExcInternalError());
+
static const unsigned int X = numbers::invalid_unsigned_int;
static const std::array<unsigned int, 5> scale_tri = {{2, 2, 2, X, X}};
static const std::array<unsigned int, 5> scale_tet = {{6, 6, 6, 6, X}};
if (dim == 2)
return {offset +
- face_orientation *
+ (combined_orientation ==
+ ReferenceCell::default_combined_face_orientation()) *
quadrature[quadrature.size() == 1 ? 0 : face_no].size()};
else if (dim == 3)
{
return {offset +
- internal::combined_face_orientation(face_orientation,
- face_rotation,
- face_flip) *
+ combined_orientation *
quadrature[quadrature.size() == 1 ? 0 : face_no].size()};
}
}
#include <deal.II/grid/tria.h>
#include <deal.II/grid/tria_iterator.h>
+#include <deal.II/grid/tria_orientation.h>
#include <algorithm>
#include <functional>
return (this->reference_cell().face_to_cell_vertices(
face,
face_vertex,
- (face_orientation ? 1 : 0) + (face_rotation ? 2 : 0) +
- (face_flip ? 4 : 0)) *
+ internal::combined_face_orientation(face_orientation,
+ face_rotation,
+ face_flip)) *
this->n_dofs_per_vertex() +
dof_index_on_vertex);
}
const unsigned int face_line = index / this->n_dofs_per_line();
const unsigned int dof_index_on_line = index % this->n_dofs_per_line();
- return (
- this->get_first_line_index() +
- this->reference_cell().face_to_cell_lines(face,
- face_line,
- (face_orientation ? 1 : 0) +
- (face_rotation ? 2 : 0) +
- (face_flip ? 4 : 0)) *
- this->n_dofs_per_line() +
- dof_index_on_line);
+ return (this->get_first_line_index() +
+ this->reference_cell().face_to_cell_lines(
+ face,
+ face_line,
+ internal::combined_face_orientation(face_orientation,
+ face_rotation,
+ face_flip)) *
+ this->n_dofs_per_line() +
+ dof_index_on_line);
}
else
// DoF is on a quad