if (structdim == 3 && fe.max_dofs_per_quad() > 0)
for (const auto quad : accessor.face_indices())
{
- const unsigned int raw_orientation = TriaAccessorImplementation::
- Implementation::face_orientation_raw(accessor, quad);
+ const auto combined_orientation = TriaAccessorImplementation::
+ Implementation::combined_face_orientation(accessor, quad);
const unsigned int quad_index = accessor.quad_index(quad);
- if (raw_orientation ==
+ if (combined_orientation ==
ReferenceCell::default_combined_face_orientation())
dof_operation.process_dofs(
accessor.get_dof_handler(),
{
// previously seen key: set orientation relative to the first
// occurrence
- orientations.set_raw_orientation(
+ orientations.set_combined_orientation(
offset_i,
ad_entity_types[offset_i]
- .template get_orientation_index<unsigned int>(
+ .template get_combined_orientation<unsigned int>(
make_array_view(ad_entity_vertices[offset_i].begin(),
ad_entity_vertices[offset_i].begin() +
ad_entity_types[offset_i].n_vertices()),
const unsigned int f = con_cq.col[f_];
// only faces with default orientation have to do something
- if (ori_cq.get_raw_orientation(f_) !=
+ if (ori_cq.get_combined_orientation(f_) !=
ReferenceCell::default_combined_face_orientation())
continue;
}
// ... comparison gives orientation
- ori_ql.set_raw_orientation(
+ ori_ql.set_combined_orientation(
con_ql.ptr[f] + l,
same ? ReferenceCell::default_combined_face_orientation() :
ReferenceCell::reversed_combined_line_orientation());
* arrays are read from or written to that correspond to valid vertex
* indices.
*
- * @deprecated Use get_orientation_index() instead.
+ * @deprecated Use get_combined_orientation() instead.
*/
template <typename T, std::size_t N>
DEAL_II_DEPRECATED_EARLY unsigned char
*
* @returns A number that describes a relative orientation. How exactly
* this index is defined is not important, but it is consistent with the
- * understanding the reorient_based_on_orientation_index() has of
+ * understanding the permute_by_combined_orientation() has of
* these orientation indices.
*/
template <typename T>
unsigned char
- get_orientation_index(const ArrayView<const T> &vertices_0,
- const ArrayView<const T> &vertices_1) const;
+ get_combined_orientation(const ArrayView<const T> &vertices_0,
+ const ArrayView<const T> &vertices_1) const;
/**
* arrays are read from or written to that correspond to valid vertex
* indices.
*
- * @deprecated Use reorient_based_on_orientation_index() instead.
+ * @deprecated Use permute_by_combined_orientation() instead.
*/
template <typename T, std::size_t N>
DEAL_II_DEPRECATED_EARLY std::array<T, N>
const unsigned int orientation) const;
/**
- * This is the inverse function to get_orientation_index(): Given a set of
+ * This is the inverse function to get_combined_orientation(): Given a set of
* vertex-associated objects (such as vertex indices, locations, etc.) and
* a desired orientation permutation, return the permuted vertex information.
*
*/
template <typename T>
boost::container::small_vector<T, 8>
- reorient_based_on_orientation_index(const ArrayView<const T> &vertices,
- const unsigned char orientation) const;
+ permute_by_combined_orientation(const ArrayView<const T> &vertices,
+ const unsigned char orientation) const;
/**
* Return a vector of faces a given @p vertex_index belongs to.
ReferenceCell::child_cell_on_face(
const unsigned int face,
const unsigned int subface,
- const unsigned char face_orientation_raw) const
+ const unsigned char combined_face_orientation) const
{
AssertIndexRange(face, n_faces());
AssertIndexRange(subface, face_reference_cell(face).n_isotropic_children());
case ReferenceCells::Quadrilateral:
{
const bool face_orientation =
- Utilities::get_bit(face_orientation_raw, 0);
- const bool face_flip = Utilities::get_bit(face_orientation_raw, 2);
+ Utilities::get_bit(combined_face_orientation, 0);
+ const bool face_flip =
+ Utilities::get_bit(combined_face_orientation, 2);
const bool face_rotation =
- Utilities::get_bit(face_orientation_raw, 1);
+ Utilities::get_bit(combined_face_orientation, 1);
return GeometryInfo<2>::child_cell_on_face(
RefinementCase<2>(RefinementPossibilities<2>::isotropic_refinement),
case ReferenceCells::Hexahedron:
{
const bool face_orientation =
- Utilities::get_bit(face_orientation_raw, 0);
- const bool face_flip = Utilities::get_bit(face_orientation_raw, 2);
+ Utilities::get_bit(combined_face_orientation, 0);
+ const bool face_flip =
+ Utilities::get_bit(combined_face_orientation, 2);
const bool face_rotation =
- Utilities::get_bit(face_orientation_raw, 1);
+ Utilities::get_bit(combined_face_orientation, 1);
return GeometryInfo<3>::child_cell_on_face(
RefinementCase<3>(RefinementPossibilities<3>::isotropic_refinement),
inline bool
ReferenceCell::standard_vs_true_line_orientation(
const unsigned int line,
- const unsigned char face_orientation_raw,
+ const unsigned char combined_face_orientation,
const bool line_orientation) const
{
if (*this == ReferenceCells::Hexahedron)
{{{true, true, false, true, false, false, true, false}},
{{true, true, true, false, false, false, false, true}}}};
- return (line_orientation == bool_table[line / 2][face_orientation_raw]);
+ return (line_orientation ==
+ bool_table[line / 2][combined_face_orientation]);
}
else
// TODO: This might actually be wrong for some of the other
// those array elements that we actually care about (see the note
// in the documentation about the arguments potentially being
// larger arrays than necessary).
- return get_orientation_index(
+ return get_combined_orientation(
make_array_view(vertices_0.begin(), vertices_0.begin() + n_vertices()),
make_array_view(vertices_1.begin(), vertices_1.begin() + n_vertices()));
}
template <typename T>
unsigned char
-ReferenceCell::get_orientation_index(const ArrayView<const T> &vertices_0,
- const ArrayView<const T> &vertices_1) const
+ReferenceCell::get_combined_orientation(
+ const ArrayView<const T> &vertices_0,
+ const ArrayView<const T> &vertices_1) const
{
Assert(vertices_0.size() == n_vertices(),
ExcMessage("The number of array elements must be equal to "
// those array elements that we actually care about (see the note
// in the documentation about the arguments potentially being
// larger arrays than necessary).
- const auto permutation = reorient_based_on_orientation_index(
+ const auto permutation = permute_by_combined_orientation(
make_array_view(vertices.begin(), vertices.begin() + n_vertices()),
orientation);
template <typename T>
boost::container::small_vector<T, 8>
-ReferenceCell::reorient_based_on_orientation_index(
+ReferenceCell::permute_by_combined_orientation(
const ArrayView<const T> &vertices,
const unsigned char orientation) const
{
const auto quad_index = pair[0];
const auto line_index =
accessor.reference_cell().standard_to_real_face_line(
- pair[1], pair[0], face_orientation_raw(accessor, quad_index));
+ pair[1], pair[0], combined_face_orientation(accessor, quad_index));
return accessor.quad(quad_index)->line_index(line_index);
}
inline static unsigned int
- face_orientation_raw(const TriaAccessor<3, 3, 3> &accessor,
- const unsigned int face)
+ combined_face_orientation(const TriaAccessor<3, 3, 3> &accessor,
+ const unsigned int face)
{
AssertIndexRange(face, accessor.n_faces());
return accessor.tria->levels[accessor.present_level]
- ->face_orientations.get_raw_orientation(
+ ->face_orientations.get_combined_orientation(
accessor.present_index * GeometryInfo<3>::faces_per_cell + face);
}
const auto quad_index = pair[0];
const auto line_within_face_index =
accessor.reference_cell().standard_to_real_face_line(
- pair[1], pair[0], face_orientation_raw(accessor, quad_index));
+ pair[1], pair[0], combined_face_orientation(accessor, quad_index));
// Then query how that line is oriented within that face:
return accessor.reference_cell().standard_vs_true_line_orientation(
pair[1],
- face_orientation_raw(accessor, quad_index),
+ combined_face_orientation(accessor, quad_index),
accessor.quad(quad_index)->line_orientation(line_within_face_index));
}
{
AssertIndexRange(face, accessor.n_faces());
accessor.tria->levels[accessor.present_level]
- ->face_orientations.set_raw_orientation(
+ ->face_orientations.set_combined_orientation(
accessor.present_index * GeometryInfo<3>::faces_per_cell + face,
combined_orientation);
}
const auto face_index = pair[0];
const auto vertex_index =
accessor.reference_cell().standard_to_real_face_vertex(
- pair[1], pair[0], face_orientation_raw(accessor, face_index));
+ pair[1], pair[0], combined_face_orientation(accessor, face_index));
return accessor.quad(face_index)->vertex_index(vertex_index);
}
const unsigned char orientation =
cell.get_triangulation()
.levels[cell.level()]
- ->face_orientations.get_raw_orientation(
+ ->face_orientations.get_combined_orientation(
cell.index() * GeometryInfo<3>::faces_per_cell + f);
// It might seem superfluous to spell out the four indices
const unsigned char orientation =
cell.get_triangulation()
.levels[cell.level()]
- ->face_orientations.get_raw_orientation(
+ ->face_orientations.get_combined_orientation(
cell.index() * GeometryInfo<3>::faces_per_cell + f);
const std::array<unsigned int, 2> my_indices{
{ref_cell.standard_to_real_face_line(0, f, orientation),
else if (ref_cell == ReferenceCells::Tetrahedron)
{
std::array<unsigned int, 3> orientations{
- {face_orientation_raw(cell, 0),
- face_orientation_raw(cell, 1),
- face_orientation_raw(cell, 2)}};
+ {combined_face_orientation(cell, 0),
+ combined_face_orientation(cell, 1),
+ combined_face_orientation(cell, 2)}};
const std::array<unsigned int, 6> my_indices{
{ref_cell.standard_to_real_face_line(0, 0, orientations[0]),
ref_cell.standard_to_real_face_line(1, 0, orientations[0]),
const unsigned char orientation =
cell.get_triangulation()
.levels[cell.level()]
- ->face_orientations.get_raw_orientation(
+ ->face_orientations.get_combined_orientation(
cell.index() * GeometryInfo<3>::faces_per_cell + f);
// It might seem superfluous to spell out the four indices and
const unsigned char orientation =
cell.get_triangulation()
.levels[cell.level()]
- ->face_orientations.get_raw_orientation(
+ ->face_orientations.get_combined_orientation(
cell.index() * GeometryInfo<3>::faces_per_cell + f);
const std::array<unsigned int, 2> my_indices{
{ref_cell.standard_to_real_face_line(0, f, orientation),
else if (ref_cell == ReferenceCells::Tetrahedron)
{
std::array<unsigned int, 3> orientations{
- {face_orientation_raw(cell, 0),
- face_orientation_raw(cell, 1),
- face_orientation_raw(cell, 2)}};
+ {combined_face_orientation(cell, 0),
+ combined_face_orientation(cell, 1),
+ combined_face_orientation(cell, 2)}};
const std::array<unsigned int, 6> my_indices{
{ref_cell.standard_to_real_face_line(0, 0, orientations[0]),
ref_cell.standard_to_real_face_line(1, 0, orientations[0]),
* Class storing orientation information for various objects in a
* Triangulation.
*
- * In deal.II, we express the orientation of an object with three
- * Booleans: orientation, rotate, and flip. The default values for these
- * are true, false, and false. These are represented either as individual
- * booleans or as a 'raw' orientation: the raw format places orientation
- * in the least significant bit, then rotate, then flip.
+ * In deal.II, we express the orientation of an object with three Booleans:
+ * orientation, rotate, and flip. The default values for these are true,
+ * false, and false. These are represented either as individual booleans or
+ * as a 'combined' orientation: the combined format places orientation in
+ * the least significant bit, then rotate, then flip.
*
* For a quadrilateral, these values correspond to
* - *orientation* : `true` is the default orientation and `false` means
* product of two lines in their standard orientation (which, e.g., points
* into the hexahedron for face 0 but out of the hexahedron for face 1).
*
- * For triangles, to enable indexing from the raw orientation, we do not
- * consider flip-rotate or flip-orient-rotate as those cases are
- * equivalent, respectively, to the identity operation or the orientation
- * = `true` case as flip-rotate is equal to the identity operation. This
- * choice ensures that the integer value of the raw orientation is in $[0,
- * 5]$.
+ * For triangles, to enable indexing from the combined orientation, we do
+ * not consider flip-rotate or flip-orient-rotate as those cases are
+ * equivalent, respectively, to the identity operation or the orientation =
+ * `true` case as flip-rotate is equal to the identity operation. This
+ * choice ensures that the integer value of the combined orientation is in
+ * $[0, 5]$.
*/
class TriaObjectsOrientations
{
memory_consumption() const;
/**
- * Get the raw orientation of the object, as described in the class
+ * Get the combined orientation of the object, as described in the class
* documentation.
*/
unsigned char
- get_raw_orientation(const unsigned int object) const;
+ get_combined_orientation(const unsigned int object) const;
/**
* Get the orientation bit of the object.
get_flip(const unsigned int object) const;
/**
- * Set the raw orientation of the object, as described in the class
+ * Set the combined orientation of the object, as described in the class
* documentation.
*/
void
- set_raw_orientation(const unsigned int object, const unsigned char value);
+ set_combined_orientation(const unsigned int object,
+ const unsigned char value);
/**
* Set the orientation bit of the object.
inline unsigned char
- TriaObjectsOrientations::get_raw_orientation(
+ TriaObjectsOrientations::get_combined_orientation(
const unsigned int object) const
{
AssertIndexRange(object, n_stored_objects);
inline void
- TriaObjectsOrientations::set_raw_orientation(const unsigned int object,
- const unsigned char value)
+ TriaObjectsOrientations::set_combined_orientation(const unsigned int object,
+ const unsigned char value)
{
AssertIndexRange(object, n_stored_objects);
flags[object] = value;
crs.col[i];
// set line orientations
- const unsigned char raw_orientation =
- connectivity.entity_orientations(1).get_raw_orientation(
- k);
+ const unsigned char combined_orientation =
+ connectivity.entity_orientations(1)
+ .get_combined_orientation(k);
// it doesn't make sense to set any flags except
// orientation for a line
Assert(
- raw_orientation ==
+ combined_orientation ==
ReferenceCell::default_combined_face_orientation() ||
- raw_orientation ==
+ combined_orientation ==
ReferenceCell::reversed_combined_line_orientation(),
ExcInternalError());
faces.quads_line_orientations
[q * GeometryInfo<3>::lines_per_face + j] =
- raw_orientation ==
+ combined_orientation ==
ReferenceCell::default_combined_face_orientation();
}
}
{
const auto &orientations = connectivity.entity_orientations(1);
for (unsigned int i = 0; i < orientations.n_objects(); ++i)
- if (orientations.get_raw_orientation(i) !=
+ if (orientations.get_combined_orientation(i) !=
ReferenceCell::default_combined_face_orientation())
{
orientation_needed = true;
// set face orientation if needed
if (orientation_needed)
{
- level.face_orientations.set_raw_orientation(
+ level.face_orientations.set_combined_orientation(
cell * GeometryInfo<dim>::faces_per_cell + j,
connectivity.entity_orientations(dim - 1)
- .get_raw_orientation(i));
+ .get_combined_orientation(i));
}
}
}
if (new_lines[line_no]->vertex_index(1) !=
new_vertices[vertex_no])
triangulation.levels[subcells[subcell_no]->level()]
- ->face_orientations.set_raw_orientation(
+ ->face_orientations.set_combined_orientation(
subcells[subcell_no]->index() *
GeometryInfo<2>::faces_per_cell +
subcell_line_no,
vertex_indices[quad_line_vertices_tri[i][f][1]]}};
const auto orientation =
- ReferenceCells::Line.get_orientation_index(
+ ReferenceCells::Line.get_combined_orientation(
make_array_view(vertices_0),
make_array_view(vertices_1));
->line(
table[triangulation.levels[hex->level()]
->face_orientations
- .get_raw_orientation(
+ .get_combined_orientation(
hex->index() * GeometryInfo<dim>::
faces_per_cell +
f)][l]);
vertex_indices[table[q][l][1]]}};
const auto orientation =
- ReferenceCells::Line.get_orientation_index(
+ ReferenceCells::Line.get_combined_orientation(
make_array_view(vertices_0),
make_array_view(vertices_1));
c,
f,
triangulation.levels[hex->level()]
- ->face_orientations.get_raw_orientation(
+ ->face_orientations
+ .get_combined_orientation(
hex->index() *
GeometryInfo<dim>::faces_per_cell +
f)));
new_hex->set_combined_face_orientation(
f,
- face->reference_cell().get_orientation_index(
- make_array_view(vertices_1),
- make_array_view(vertices_0)));
+ face->reference_cell()
+ .get_combined_orientation(
+ make_array_view(vertices_1),
+ make_array_view(vertices_0)));
}
}
else if (new_hex->n_faces() == 6)
face_iter->line(0)->vertex_index(line_orientations[0]),
face_iter->line(1)->vertex_index(line_orientations[1])}};
- const unsigned char orientate =
- levels[l]->face_orientations.get_raw_orientation(
+ const unsigned char combined_orientation =
+ levels[l]->face_orientations.get_combined_orientation(
cell->index() * GeometryInfo<3>::faces_per_cell + face);
std::array<unsigned int, 4> vertex_order{
- {ref_cell.standard_to_real_face_vertex(0, face, orientate),
- ref_cell.standard_to_real_face_vertex(1, face, orientate),
- ref_cell.standard_to_real_face_vertex(2, face, orientate),
- ref_cell.standard_to_real_face_vertex(3, face, orientate)}};
+ {ref_cell.standard_to_real_face_vertex(0,
+ face,
+ combined_orientation),
+ ref_cell.standard_to_real_face_vertex(1,
+ face,
+ combined_orientation),
+ ref_cell.standard_to_real_face_vertex(2,
+ face,
+ combined_orientation),
+ ref_cell.standard_to_real_face_vertex(
+ 3, face, combined_orientation)}};
const unsigned int index = my_index + 4 * (face - 4);
for (unsigned int i = 0; i < 4; ++i)