// one, taking into account multiplicities, and other complications
unsigned int total_index = 0;
for (const unsigned int vertex_number :
- dealii::internal::ReferenceCell::get_cell(
- fes.front()->reference_cell())
- .vertex_indices())
+ fes.front()->reference_cell().vertex_indices())
{
for (unsigned int base = 0; base < fes.size(); ++base)
for (unsigned int m = 0; m < multiplicities[base]; ++m)
// 2. Lines
for (const unsigned int line_number :
- dealii::internal::ReferenceCell::get_cell(
- fes.front()->reference_cell())
- .line_indices())
+ fes.front()->reference_cell().line_indices())
{
for (unsigned int base = 0; base < fes.size(); ++base)
for (unsigned int m = 0; m < multiplicities[base]; ++m)
// base elements, and other complications
unsigned int total_index = 0;
for (const unsigned int vertex_number :
- dealii::internal::ReferenceCell::get_cell(
- fes.front()->reference_cell())
- .vertex_indices())
+ fes.front()->reference_cell().vertex_indices())
{
unsigned int comp_start = 0;
for (unsigned int base = 0; base < fes.size(); ++base)
// 2. Lines
for (const unsigned int line_number :
- dealii::internal::ReferenceCell::get_cell(
- fes.front()->reference_cell())
- .line_indices())
+ fes.front()->reference_cell().line_indices())
{
unsigned int comp_start = 0;
for (unsigned int base = 0; base < fes.size(); ++base)
// vertex, etc
total_index = 0;
for (const unsigned int vertex_number :
- dealii::internal::ReferenceCell::get_cell(fe.reference_cell())
- .vertex_indices())
+ fe.reference_cell().vertex_indices())
{
unsigned int comp_start = 0;
for (unsigned int base = 0; base < fe.n_base_elements(); ++base)
}
// 2. Lines
- for (const unsigned int line_number :
- dealii::internal::ReferenceCell::get_cell(fe.reference_cell())
- .line_indices())
+ for (const unsigned int line_number : fe.reference_cell().line_indices())
{
unsigned int comp_start = 0;
for (unsigned int base = 0; base < fe.n_base_elements(); ++base)
unsigned int
n_vertices() const;
+ /**
+ * Return an object that can be thought of as an array containing all
+ * indices from zero to n_vertices().
+ */
+ std_cxx20::ranges::iota_view<unsigned int, unsigned int>
+ vertex_indices() const;
+
/**
* Return the number of lines that make up the reference
* cell in question. A line is an "edge" (a one-dimensional
unsigned int
n_lines() const;
+ /**
+ * Return an object that can be thought of as an array containing all
+ * indices from zero to n_lines().
+ */
+ std_cxx20::ranges::iota_view<unsigned int, unsigned int>
+ line_indices() const;
+
/**
* Return the number of faces that make up the reference
* cell in question. A face is a `(dim-1)`-dimensional
unsigned int
n_faces() const;
+ /**
+ * Return an object that can be thought of as an array containing all
+ * indices from zero to n_faces().
+ */
+ std_cxx20::ranges::iota_view<unsigned int, unsigned int>
+ face_indices() const;
+
/**
* Return the reference-cell type of face @p face_no of the current
* object. For example, if the current object is
+inline std_cxx20::ranges::iota_view<unsigned int, unsigned int>
+ReferenceCell::vertex_indices() const
+{
+ return {0U, n_vertices()};
+}
+
+
+
+inline std_cxx20::ranges::iota_view<unsigned int, unsigned int>
+ReferenceCell::line_indices() const
+{
+ return {0U, n_lines()};
+}
+
+
+
+inline std_cxx20::ranges::iota_view<unsigned int, unsigned int>
+ReferenceCell::face_indices() const
+{
+ return {0U, n_faces()};
+}
+
+
+
inline ReferenceCell
ReferenceCell::face_reference_cell(const unsigned int face_no) const
{
return 0;
}
- public:
/**
* Return an object that can be thought of as an array containing all
* indices from zero to n_vertices().
return {0U, n_faces()};
}
+ public:
/**
* Standard decomposition of vertex index into face and face-vertex
* index.
AssertThrowExodusII(ierr);
const ReferenceCell type =
exodusii_name_to_type(string_temp.data(), n_nodes_per_element);
- const internal::ReferenceCell::Base &info =
- internal::ReferenceCell::get_cell(type);
// The number of nodes per element may be larger than what we want to
// read - for example, if the Exodus file contains a QUAD9 element, we
// only want to read the first four values and ignore the rest.
- Assert(int(info.n_vertices()) <= n_nodes_per_element, ExcInternalError());
+ Assert(int(type.n_vertices()) <= n_nodes_per_element, ExcInternalError());
std::vector<int> connection(n_nodes_per_element * n_block_elements);
ierr = ex_get_conn(ex_id,
for (unsigned int elem_n = 0; elem_n < connection.size();
elem_n += n_nodes_per_element)
{
- CellData<dim> cell(info.n_vertices());
- for (unsigned int i : info.vertex_indices())
+ CellData<dim> cell(type.n_vertices());
+ for (unsigned int i : type.vertex_indices())
{
- cell.vertices[info.exodusii_vertex_to_deal_vertex(i)] =
+ cell.vertices[internal::ReferenceCell::get_cell(info)
+ .exodusii_vertex_to_deal_vertex(i)] =
connection[elem_n + i] - 1;
}
cell.material_id = element_block_id;
if (dim == 1)
return {};
- const auto &info = internal::ReferenceCell::get_cell(
- dim == 2 ? ReferenceCells::Triangle : ReferenceCells::Tetrahedron);
std::vector<std::vector<Point<dim - 1>>> unit_face_points;
// all faces have the same support points
- for (auto face_n : info.face_indices())
+ for (auto face_n :
+ (dim == 2 ? ReferenceCells::Triangle : ReferenceCells::Tetrahedron)
+ .face_indices())
{
(void)face_n;
unit_face_points.emplace_back(
{
deallog << fe.get_name() << ": " << std::endl;
- const auto &reference_cell =
- internal::ReferenceCell::get_cell(fe.reference_cell());
-
deallog << " n_dofs_per_vertex(): " << fe.n_dofs_per_vertex() << std::endl;
deallog << " n_dofs_per_line(): " << fe.n_dofs_per_line() << std::endl;
deallog << " n_dofs_per_quad(): ";
- for (unsigned int i = 0; i < (dim == 2 ? 1 : reference_cell.n_faces()); ++i)
+ for (unsigned int i = 0; i < (dim == 2 ? 1 : fe.reference_cell().n_faces());
+ ++i)
deallog << fe.n_dofs_per_quad(i) << " ";
deallog << std::endl;
deallog << " n_dofs_per_hex(): " << fe.n_dofs_per_hex() << std::endl;
deallog << " n_dofs_per_face(): ";
- for (unsigned int i = 0; i < reference_cell.n_faces(); ++i)
+ for (unsigned int i = 0; i < fe.reference_cell().n_faces(); ++i)
deallog << fe.n_dofs_per_face(i) << " ";
deallog << std::endl;
void
test(const ReferenceCell &reference_cell)
{
- const auto kind = ReferenceCell(reference_cell);
- const auto &info = internal::ReferenceCell::get_cell(reference_cell);
+ const auto kind = ReferenceCell(reference_cell);
- for (const auto v : info.vertex_indices())
+ for (const auto v : reference_cell.vertex_indices())
{
deallog << v << ": ";
for (const auto i : kind.faces_for_given_vertex(v))
void
test(const ReferenceCell &reference_cell)
{
- for (const auto face_no :
- internal::ReferenceCell::get_cell(reference_cell).face_indices())
+ for (const auto face_no : reference_cell.face_indices())
{
deallog << reference_cell.template unit_normal_vectors<dim>(face_no)
<< std::endl;