From 56031c3fd7ff0091ac8fad1fe6d169e042243efd Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 9 Jun 2023 16:02:50 -0600 Subject: [PATCH] Rename an internal function. --- include/deal.II/fe/fe_data.h | 22 ++++++++++++++++------ source/fe/fe.cc | 6 +++--- source/fe/fe_poly_tensor.cc | 8 ++++---- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/include/deal.II/fe/fe_data.h b/include/deal.II/fe/fe_data.h index 2ecbf3b37e..cd5db83007 100644 --- a/include/deal.II/fe/fe_data.h +++ b/include/deal.II/fe/fe_data.h @@ -541,15 +541,25 @@ public: reference_cell() const; /** - * Number of unique quads. If all quads have the same type, the value is - * one; else it equals the number of quads. + * Number of unique 2d subobjects. If all two-dimensional subobjects + * are of the same kind, the value is one; else it equals the number + * of two-dimensional subobjects. For example, for hex reference + * cells with the usual finite elements, each face has the same + * geometric shape (a square) and each face has the same number and + * kind of shape functions associated with it; as a consequence, the + * returned value is one. On the other hand, for a wedge element, + * the two-dimensional subobjects can be both quadrilaterals and + * triangles, and so the returned value equals the number of faces + * of these objects (i.e., five). */ unsigned int - n_unique_quads() const; + n_unique_2d_subobjects() const; /** - * Number of unique faces. If all faces have the same type, the value is - * one; else it equals the number of faces. + * Number of unique faces. If all faces have the same type (i.e., + * have the same shape and also have the same kind and number of + * DoFs associated with them), the value is one; else it equals the + * number of faces. */ unsigned int n_unique_faces() const; @@ -774,7 +784,7 @@ FiniteElementData::reference_cell() const template inline unsigned int -FiniteElementData::n_unique_quads() const +FiniteElementData::n_unique_2d_subobjects() const { return number_of_unique_2d_subobjects; } diff --git a/source/fe/fe.cc b/source/fe/fe.cc index e19f0e90da..eea16f9691 100644 --- a/source/fe/fe.cc +++ b/source/fe/fe.cc @@ -152,9 +152,9 @@ FiniteElement::FiniteElement( if (dim == 3) { adjust_quad_dof_index_for_face_orientation_table.resize( - this->n_unique_quads()); + this->n_unique_2d_subobjects()); - for (unsigned int f = 0; f < this->n_unique_quads(); ++f) + for (unsigned int f = 0; f < this->n_unique_2d_subobjects(); ++f) { adjust_quad_dof_index_for_face_orientation_table[f] = Table<2, int>(this->n_dofs_per_quad(f), @@ -677,7 +677,7 @@ FiniteElement::adjust_quad_dof_index_for_face_orientation( // the function should also not have been // called AssertIndexRange(index, this->n_dofs_per_quad(face)); - const auto table_n = this->n_unique_quads() == 1 ? 0 : face; + const auto table_n = this->n_unique_2d_subobjects() == 1 ? 0 : face; Assert( adjust_quad_dof_index_for_face_orientation_table[table_n].n_elements() == (this->reference_cell().n_face_orientations(face)) * diff --git a/source/fe/fe_poly_tensor.cc b/source/fe/fe_poly_tensor.cc index dca1c22c84..d7707caf9c 100644 --- a/source/fe/fe_poly_tensor.cc +++ b/source/fe/fe_poly_tensor.cc @@ -200,9 +200,9 @@ FE_PolyTensor::FE_PolyTensor( if (dim == 3) { adjust_quad_dof_sign_for_face_orientation_table.resize( - this->n_unique_quads()); + this->n_unique_2d_subobjects()); - for (unsigned int f = 0; f < this->n_unique_quads(); ++f) + for (unsigned int f = 0; f < this->n_unique_2d_subobjects(); ++f) { adjust_quad_dof_sign_for_face_orientation_table[f] = Table<2, bool>(this->n_dofs_per_quad(f), @@ -255,14 +255,14 @@ FE_PolyTensor::adjust_quad_dof_sign_for_face_orientation( // called AssertIndexRange(index, this->n_dofs_per_quad(face)); Assert(adjust_quad_dof_sign_for_face_orientation_table - [this->n_unique_quads() == 1 ? 0 : face] + [this->n_unique_2d_subobjects() == 1 ? 0 : face] .n_elements() == this->reference_cell().n_face_orientations(face) * this->n_dofs_per_quad(face), ExcInternalError()); return adjust_quad_dof_sign_for_face_orientation_table - [this->n_unique_quads() == 1 ? 0 : face]( + [this->n_unique_2d_subobjects() == 1 ? 0 : face]( index, 4 * static_cast(face_orientation) + 2 * static_cast(face_flip) + static_cast(face_rotation)); -- 2.39.5