From: Wolfgang Bangerth Date: Thu, 25 Feb 2021 03:23:53 +0000 (-0700) Subject: Rename variables to make their names more standard. X-Git-Tag: v9.3.0-rc1~416^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4124b0c18f390bf531dd678afe28850bf3125798;p=dealii.git Rename variables to make their names more standard. --- diff --git a/include/deal.II/fe/fe_base.h b/include/deal.II/fe/fe_base.h index e01f08b130..f01b1957ff 100644 --- a/include/deal.II/fe/fe_base.h +++ b/include/deal.II/fe/fe_base.h @@ -288,7 +288,7 @@ private: /** * Reference cell type. */ - const ReferenceCell cell_type; + const ReferenceCell reference_cell_kind; /** * Number of unique quads. If all quads have the same type, the value is @@ -495,7 +495,7 @@ public: * underlying geometric entity can be specified. */ FiniteElementData(const std::vector &dofs_per_object, - const ReferenceCell cell_type, + const ReferenceCell reference_cell, const unsigned int n_components, const unsigned int degree, const Conformity conformity = unknown, @@ -508,7 +508,7 @@ public: * is particular useful for cells with triangles and quadrilaterals as faces. */ FiniteElementData(const internal::GenericDoFsPerObject &data, - const ReferenceCell cell_type, + const ReferenceCell reference_cell, const unsigned int n_components, const unsigned int degree, const Conformity conformity = unknown, @@ -681,12 +681,12 @@ namespace internal { /** * Utility function to convert "dofs per object" information - * of a @p dim dimensional reference cell @p cell_type. + * of a @p dim dimensional reference cell @p reference_cell. */ internal::GenericDoFsPerObject expand(const unsigned int dim, const std::vector &dofs_per_object, - const dealii::ReferenceCell cell_type); + const dealii::ReferenceCell reference_cell); } // namespace internal @@ -748,7 +748,7 @@ template inline ReferenceCell FiniteElementData::reference_cell() const { - return cell_type; + return reference_cell_kind; } diff --git a/include/deal.II/fe/mapping.h b/include/deal.II/fe/mapping.h index d74b0680a2..f06818365b 100644 --- a/include/deal.II/fe/mapping.h +++ b/include/deal.II/fe/mapping.h @@ -403,10 +403,10 @@ public: /** * Returns if this instance of Mapping is compatible with the type of cell - * in @p cell_type. + * in @p reference_cell. */ virtual bool - is_compatible_with(const ReferenceCell &cell_type) const = 0; + is_compatible_with(const ReferenceCell &reference_cell) const = 0; /** * @name Mapping points between reference and real cells diff --git a/include/deal.II/fe/mapping_cartesian.h b/include/deal.II/fe/mapping_cartesian.h index 4213e97eb8..c7ae991b7d 100644 --- a/include/deal.II/fe/mapping_cartesian.h +++ b/include/deal.II/fe/mapping_cartesian.h @@ -89,7 +89,7 @@ public: preserves_vertex_locations() const override; virtual bool - is_compatible_with(const ReferenceCell &cell_type) const override; + is_compatible_with(const ReferenceCell &reference_cell) const override; /** * @name Mapping points between reference and real cells diff --git a/include/deal.II/fe/mapping_fe.h b/include/deal.II/fe/mapping_fe.h index 474e89b70a..fbc7b0fdd1 100644 --- a/include/deal.II/fe/mapping_fe.h +++ b/include/deal.II/fe/mapping_fe.h @@ -86,7 +86,7 @@ public: virtual bool - is_compatible_with(const ReferenceCell &cell_type) const override; + is_compatible_with(const ReferenceCell &reference_cell) const override; /** * Always returns @p true because the default implementation of functions in diff --git a/include/deal.II/fe/mapping_fe_field.h b/include/deal.II/fe/mapping_fe_field.h index be0c3dc320..6c530ee449 100644 --- a/include/deal.II/fe/mapping_fe_field.h +++ b/include/deal.II/fe/mapping_fe_field.h @@ -211,7 +211,7 @@ public: preserves_vertex_locations() const override; virtual bool - is_compatible_with(const ReferenceCell &cell_type) const override; + is_compatible_with(const ReferenceCell &reference_cell) const override; /** * Return the mapped vertices of a cell. diff --git a/include/deal.II/fe/mapping_q.h b/include/deal.II/fe/mapping_q.h index d7259b92a0..63dd4a249b 100644 --- a/include/deal.II/fe/mapping_q.h +++ b/include/deal.II/fe/mapping_q.h @@ -125,7 +125,7 @@ public: &cell) const override; virtual bool - is_compatible_with(const ReferenceCell &cell_type) const override; + is_compatible_with(const ReferenceCell &reference_cell) const override; /** * Transform the point @p p on the unit cell to the point @p p_real on the diff --git a/include/deal.II/fe/mapping_q_generic.h b/include/deal.II/fe/mapping_q_generic.h index 9ce7f836a1..d20a57d3a4 100644 --- a/include/deal.II/fe/mapping_q_generic.h +++ b/include/deal.II/fe/mapping_q_generic.h @@ -171,7 +171,7 @@ public: &cell) const override; virtual bool - is_compatible_with(const ReferenceCell &cell_type) const override; + is_compatible_with(const ReferenceCell &reference_cell) const override; /** * @name Mapping points between reference and real cells diff --git a/source/fe/fe_data.cc b/source/fe/fe_data.cc index b7a980e6cb..d56435b194 100644 --- a/source/fe/fe_data.cc +++ b/source/fe/fe_data.cc @@ -136,12 +136,12 @@ FiniteElementData::FiniteElementData( template FiniteElementData::FiniteElementData( const internal::GenericDoFsPerObject &data, - const ReferenceCell cell_type, + const ReferenceCell reference_cell, const unsigned int n_components, const unsigned int degree, const Conformity conformity, const BlockIndices & block_indices) - : cell_type(cell_type) + : reference_cell_kind(reference_cell) , number_unique_quads(data.dofs_per_object_inclusive[2].size()) , number_unique_faces(data.dofs_per_object_inclusive[dim - 1].size()) , dofs_per_vertex(data.dofs_per_object_exclusive[0][0]) diff --git a/source/fe/mapping_cartesian.cc b/source/fe/mapping_cartesian.cc index 0cb01fa4ee..5dce5b309c 100644 --- a/source/fe/mapping_cartesian.cc +++ b/source/fe/mapping_cartesian.cc @@ -73,16 +73,16 @@ MappingCartesian::preserves_vertex_locations() const template bool MappingCartesian::is_compatible_with( - const ReferenceCell &cell_type) const + const ReferenceCell &reference_cell) const { - Assert(dim == cell_type.get_dimension(), + Assert(dim == reference_cell.get_dimension(), ExcMessage("The dimension of your mapping (" + Utilities::to_string(dim) + ") and the reference cell cell_type (" + - Utilities::to_string(cell_type.get_dimension()) + + Utilities::to_string(reference_cell.get_dimension()) + " ) do not agree.")); - return cell_type.is_hyper_cube(); + return reference_cell.is_hyper_cube(); } diff --git a/source/fe/mapping_fe.cc b/source/fe/mapping_fe.cc index 577aa3924d..3a4cc76024 100644 --- a/source/fe/mapping_fe.cc +++ b/source/fe/mapping_fe.cc @@ -2311,16 +2311,16 @@ MappingFE::get_bounding_box( template bool MappingFE::is_compatible_with( - const ReferenceCell &cell_type) const + const ReferenceCell &reference_cell) const { - Assert(dim == cell_type.get_dimension(), + Assert(dim == reference_cell.get_dimension(), ExcMessage("The dimension of your mapping (" + Utilities::to_string(dim) + ") and the reference cell cell_type (" + - Utilities::to_string(cell_type.get_dimension()) + + Utilities::to_string(reference_cell.get_dimension()) + " ) do not agree.")); - return fe->reference_cell() == cell_type; + return fe->reference_cell() == reference_cell; } diff --git a/source/fe/mapping_fe_field.cc b/source/fe/mapping_fe_field.cc index 52fd7f8f4d..cc4281045c 100644 --- a/source/fe/mapping_fe_field.cc +++ b/source/fe/mapping_fe_field.cc @@ -349,16 +349,16 @@ MappingFEField::preserves_vertex_locations() template bool MappingFEField::is_compatible_with( - const ReferenceCell &cell_type) const + const ReferenceCell &reference_cell) const { - Assert(dim == cell_type.get_dimension(), + Assert(dim == reference_cell.get_dimension(), ExcMessage("The dimension of your mapping (" + Utilities::to_string(dim) + ") and the reference cell cell_type (" + - Utilities::to_string(cell_type.get_dimension()) + + Utilities::to_string(reference_cell.get_dimension()) + " ) do not agree.")); - return euler_dof_handler->get_fe().reference_cell() == cell_type; + return euler_dof_handler->get_fe().reference_cell() == reference_cell; } diff --git a/source/fe/mapping_q.cc b/source/fe/mapping_q.cc index 4c130a9a5c..6a5c7d0622 100644 --- a/source/fe/mapping_q.cc +++ b/source/fe/mapping_q.cc @@ -562,15 +562,16 @@ MappingQ::get_bounding_box( template bool MappingQ::is_compatible_with( - const ReferenceCell &cell_type) const + const ReferenceCell &reference_cell) const { - if (cell_type.get_dimension() != dim) - return false; // TODO: or is this an error? - - if (cell_type.is_hyper_cube()) - return true; - - return false; + Assert(dim == reference_cell.get_dimension(), + ExcMessage("The dimension of your mapping (" + + Utilities::to_string(dim) + + ") and the reference cell cell_type (" + + Utilities::to_string(reference_cell.get_dimension()) + + " ) do not agree.")); + + return reference_cell.is_hyper_cube(); } diff --git a/source/fe/mapping_q_generic.cc b/source/fe/mapping_q_generic.cc index 3e420a2160..51f6966cbe 100644 --- a/source/fe/mapping_q_generic.cc +++ b/source/fe/mapping_q_generic.cc @@ -1656,15 +1656,16 @@ MappingQGeneric::get_bounding_box( template bool MappingQGeneric::is_compatible_with( - const ReferenceCell &cell_type) const + const ReferenceCell &reference_cell) const { - if (cell_type.get_dimension() != dim) - return false; // TODO: or is this an error? - - if (cell_type.is_hyper_cube()) - return true; - - return false; + Assert(dim == reference_cell.get_dimension(), + ExcMessage("The dimension of your mapping (" + + Utilities::to_string(dim) + + ") and the reference cell cell_type (" + + Utilities::to_string(reference_cell.get_dimension()) + + " ) do not agree.")); + + return reference_cell.is_hyper_cube(); }