It is useful to have this value since lines only have two possible orientations.
const types::geometric_orientation default_geometric_orientation =
static_cast<types::geometric_orientation>(0b001);
+ /**
+ * Value indicating that a line is in the reverse orientation. Since lines can
+ * only have two possible orientations, this value and
+ * default_geometric_orientation completely encode the possible values for
+ * line orientations.
+ *
+ * See the
+ * @ref GlossFaceOrientation "glossary"
+ * for more information.
+ */
+ const types::geometric_orientation reverse_line_orientation =
+ static_cast<types::geometric_orientation>(0b000);
+
/**
* A special id for an invalid subdomain id. This value may not be used as a
* valid id but is used, for example, for default arguments to indicate a
ori_ql.set_combined_orientation(
con_ql.ptr[f] + l,
same ? numbers::default_geometric_orientation :
- ReferenceCell::reversed_combined_line_orientation());
+ numbers::reverse_line_orientation);
}
}
}
* lines only have two possible orientations, this function and
* ReferenceCell::default_combined_face_orientation() encode all of its
* possible orientation states.
+ *
+ * @deprecated Use numbers::reverse_line_orientation instead.
*/
+ DEAL_II_DEPRECATED_EARLY_WITH_COMMENT(
+ "Use numbers::reverse_line_orientation instead.")
static constexpr types::geometric_orientation
reversed_combined_line_orientation();
{
// For a reversed line 'orientation' is false and neither flip nor rotate are
// defined.
- return 0b000;
+ return numbers::reverse_line_orientation;
}
const types::geometric_orientation line_orientation) const
{
constexpr auto D = numbers::default_geometric_orientation;
- constexpr auto R = ReferenceCell::reversed_combined_line_orientation();
+ constexpr auto R = numbers::reverse_line_orientation;
if (*this == ReferenceCells::Hexahedron)
{
static constexpr dealii::ndarray<types::geometric_orientation, 2, 8>
line_orientation == table[face_line_no / 2][combined_face_orientation];
return match ? numbers::default_geometric_orientation :
- ReferenceCell::reversed_combined_line_orientation();
+ numbers::reverse_line_orientation;
}
else if (*this == ReferenceCells::Tetrahedron)
{
line_orientation == table[combined_line][combined_face_orientation];
return match ? numbers::default_geometric_orientation :
- ReferenceCell::reversed_combined_line_orientation();
+ numbers::reverse_line_orientation;
}
else
// TODO: This might actually be wrong for some of the other
face_rotation(const unsigned int face);
/**
- * @brief Always return ReferenceCell::reversed_combined_line_orientation()
+ * @brief Always return numbers::reverse_line_orientation
*/
static types::geometric_orientation
line_orientation(const unsigned int line);
face_rotation(const unsigned int face);
/**
- * @brief Always return ReferenceCell::reversed_combined_line_orientation()
+ * @brief Always return numbers::reverse_line_orientation
*/
static types::geometric_orientation
line_orientation(const unsigned int line);
else if (dim == 2)
Assert(combined_orientation ==
numbers::default_geometric_orientation ||
- combined_orientation ==
- ReferenceCell::reversed_combined_line_orientation(),
+ combined_orientation == numbers::reverse_line_orientation,
ExcMessage(
"In 2d, the only valid values of the combined orientation "
"are the standard orientation or the reversed line "
{
const auto combined_orientation = combined_face_orientation(line);
Assert(combined_orientation == numbers::default_geometric_orientation ||
- combined_orientation ==
- ReferenceCell::reversed_combined_line_orientation(),
+ combined_orientation == numbers::reverse_line_orientation,
ExcInternalError());
return combined_orientation;
}
ExcInternalError());
return this->tria->faces->quads_line_orientations[index] ?
numbers::default_geometric_orientation :
- ReferenceCell::reversed_combined_line_orientation();
+ numbers::reverse_line_orientation;
}
else if constexpr (structdim == 3 && dim == 3)
{
inline types::geometric_orientation
TriaAccessor<0, dim, spacedim>::line_orientation(const unsigned int /*line*/)
{
- return ReferenceCell::reversed_combined_line_orientation();
+ return numbers::reverse_line_orientation;
}
inline types::geometric_orientation
TriaAccessor<0, 1, spacedim>::line_orientation(const unsigned int /*line*/)
{
- return ReferenceCell::reversed_combined_line_orientation();
+ return numbers::reverse_line_orientation;
}
const types::geometric_orientation combined_orientation) const
{
Assert(combined_orientation == numbers::default_geometric_orientation ||
- combined_orientation ==
- ReferenceCell::reversed_combined_line_orientation(),
+ combined_orientation == numbers::reverse_line_orientation,
ExcInternalError());
AssertIndexRange(index, this->n_dofs_per_line());
// TODO: This fixes only lowest order
for (unsigned int l = 0; l < GeometryInfo<dim>::lines_per_cell; ++l)
if ((cell->line_orientation(l) ==
- ReferenceCell::reversed_combined_line_orientation()) &&
+ numbers::reverse_line_orientation) &&
mapping_kind[0] == mapping_nedelec)
line_dof_sign[l] = -1.0;
}
// which all dofs are face dofs
for (unsigned int l = 0; l < GeometryInfo<dim>::lines_per_cell; ++l)
if ((cell->line_orientation(l) ==
- ReferenceCell::reversed_combined_line_orientation()) &&
+ numbers::reverse_line_orientation) &&
mapping_kind[0] == mapping_nedelec)
line_dof_sign[l] = -1.0;
}
{
AssertIndexRange(child_no, ReferenceCells::Line.template n_children<1>());
Assert(line_orientation == numbers::default_geometric_orientation ||
- line_orientation ==
- ReferenceCell::reversed_combined_line_orientation(),
+ line_orientation == numbers::reverse_line_orientation,
ExcInternalError());
constexpr auto D = numbers::default_geometric_orientation;
if (child_no == 0)
.get_combined_orientation(k);
// it doesn't make sense to set any flags except
// orientation for a line
- Assert(
- combined_orientation ==
- numbers::default_geometric_orientation ||
- combined_orientation ==
- ReferenceCell::reversed_combined_line_orientation(),
- ExcInternalError());
+ Assert(combined_orientation ==
+ numbers::default_geometric_orientation ||
+ combined_orientation ==
+ numbers::reverse_line_orientation,
+ ExcInternalError());
// Same convention as TriaAccessor::set_line_orientation():
// store true for the default orientation and false for
// reversed.
// the last one.
std::fill(inherited_orientations.begin() + lmin,
inherited_orientations.begin() + lmax,
- ReferenceCell::reversed_combined_line_orientation());
+ numbers::reverse_line_orientation);
}
else if (cell->reference_cell() == ReferenceCells::Quadrilateral)
{
Assert(combined_orientation ==
numbers::default_geometric_orientation ||
combined_orientation ==
- ReferenceCell::reversed_combined_line_orientation(),
+ numbers::reverse_line_orientation,
ExcInternalError());
for (unsigned int c = 0; c < 2; ++c)
{
inherited_orientations[2 * face_no + c] =
cell->combined_face_orientation(face_no);
}
- if (combined_orientation ==
- ReferenceCell::reversed_combined_line_orientation())
+ if (combined_orientation == numbers::reverse_line_orientation)
std::swap(new_lines[2 * face_no], new_lines[2 * face_no + 1]);
}
Assert(lines[i]->vertex_index((i + 1) % 2) ==
middle_vertices[i % 2],
ExcInternalError());
- line_orientation[i] = ReferenceCell::
- reversed_combined_line_orientation();
+ line_orientation[i] =
+ numbers::reverse_line_orientation;
}
// set up the new quad, line numbering is as
Assert(lines[i]->vertex_index((i + 1) % 2) ==
middle_vertices[i % 2],
ExcInternalError());
- line_orientation[i] = ReferenceCell::
- reversed_combined_line_orientation();
+ line_orientation[i] =
+ numbers::reverse_line_orientation;
}
// set up the new quad, line numbering is as
Assert(lines[i]->vertex_index((i + 1) % 2) ==
middle_vertices[i % 2],
ExcInternalError());
- line_orientation[i] = ReferenceCell::
- reversed_combined_line_orientation();
+ line_orientation[i] =
+ numbers::reverse_line_orientation;
}
// set up the new quad, line numbering is as
Assert(lines[i]->vertex_index(1) ==
middle_vertices[i],
ExcInternalError());
- line_orientation[i] = ReferenceCell::
- reversed_combined_line_orientation();
+ line_orientation[i] =
+ numbers::reverse_line_orientation;
}
// note: for lines 4 to 11 (inner lines of the
(middle_vertex_index<dim, spacedim>(
hex->face(3 + i / 4))),
ExcInternalError());
- line_orientation[i] = ReferenceCell::
- reversed_combined_line_orientation();
+ line_orientation[i] =
+ numbers::reverse_line_orientation;
}
// for the last line the line orientation is
// always true, since it was just constructed
Assert(lines[i]->vertex_index(1) ==
middle_vertices[i],
ExcInternalError());
- line_orientation[i] = ReferenceCell::
- reversed_combined_line_orientation();
+ line_orientation[i] =
+ numbers::reverse_line_orientation;
}
// note: for lines 4 to 11 (inner lines of the
(middle_vertex_index<dim, spacedim>(
hex->face(1 + i / 4))),
ExcInternalError());
- line_orientation[i] = ReferenceCell::
- reversed_combined_line_orientation();
+ line_orientation[i] =
+ numbers::reverse_line_orientation;
}
// for the last line the line orientation is
// always true, since it was just constructed
Assert(lines[i]->vertex_index(1) ==
middle_vertices[i],
ExcInternalError());
- line_orientation[i] = ReferenceCell::
- reversed_combined_line_orientation();
+ line_orientation[i] =
+ numbers::reverse_line_orientation;
}
// note: for lines 4 to 11 (inner lines of the
(middle_vertex_index<dim, spacedim>(
hex->face(i / 4 - 1))),
ExcInternalError());
- line_orientation[i] = ReferenceCell::
- reversed_combined_line_orientation();
+ line_orientation[i] =
+ numbers::reverse_line_orientation;
}
// for the last line the line orientation is always
// the default, since it was just constructed that way
Assert(lines[i]->vertex_index(i % 2) ==
vertex_indices[i / 4],
ExcInternalError());
- line_orientation[i] = ReferenceCell::
- reversed_combined_line_orientation();
+ line_orientation[i] =
+ numbers::reverse_line_orientation;
}
// for the last 6 lines the line orientation is
// always true, since they were just constructed
deallog << dofs_2[i] << " is located at " << support_points[dofs_2[i]]
<< std::endl;
- DoFTools::make_periodicity_constraints(
- face_1,
- face_2,
- constraint_matrix,
- ComponentMask(),
- ReferenceCell::reversed_combined_line_orientation());
+ DoFTools::make_periodicity_constraints(face_1,
+ face_2,
+ constraint_matrix,
+ ComponentMask(),
+ numbers::reverse_line_orientation);
constraint_matrix.print(deallog.get_file_stream());
constraint_matrix.close();
deallog << "Matching:" << std::endl;
deallog << dofs_2[i] << " is located at " << support_points[dofs_2[i]]
<< std::endl;
- DoFTools::make_periodicity_constraints(
- face_1,
- face_2,
- constraint_matrix,
- ComponentMask(),
- ReferenceCell::reversed_combined_line_orientation());
+ DoFTools::make_periodicity_constraints(face_1,
+ face_2,
+ constraint_matrix,
+ ComponentMask(),
+ numbers::reverse_line_orientation);
constraint_matrix.print(deallog.get_file_stream());
constraint_matrix.close();
deallog << "Matching:" << std::endl;
p1.first = cell->line(l)->vertex_index(0);
p1.second = cell->line(l)->vertex_index(1);
- if (orientation_exp ==
- ReferenceCell::reversed_combined_line_orientation())
+ if (orientation_exp == numbers::reverse_line_orientation)
std::swap(p1.first, p1.second);
success &= (p0 == p1);