]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Rename variables to make their names more standard. 11807/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Thu, 25 Feb 2021 03:23:53 +0000 (20:23 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 25 Feb 2021 03:23:53 +0000 (20:23 -0700)
13 files changed:
include/deal.II/fe/fe_base.h
include/deal.II/fe/mapping.h
include/deal.II/fe/mapping_cartesian.h
include/deal.II/fe/mapping_fe.h
include/deal.II/fe/mapping_fe_field.h
include/deal.II/fe/mapping_q.h
include/deal.II/fe/mapping_q_generic.h
source/fe/fe_data.cc
source/fe/mapping_cartesian.cc
source/fe/mapping_fe.cc
source/fe/mapping_fe_field.cc
source/fe/mapping_q.cc
source/fe/mapping_q_generic.cc

index e01f08b1303afd61642c82b85e2a89c7490dfbfd..f01b1957ffd5430f42e111d597448a632d68b9d9 100644 (file)
@@ -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<unsigned int> &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<unsigned int> &dofs_per_object,
-         const dealii::ReferenceCell      cell_type);
+         const dealii::ReferenceCell      reference_cell);
 } // namespace internal
 
 
@@ -748,7 +748,7 @@ template <int dim>
 inline ReferenceCell
 FiniteElementData<dim>::reference_cell() const
 {
-  return cell_type;
+  return reference_cell_kind;
 }
 
 
index d74b0680a2fbdc6cb539187db9c7cc4113c39063..f06818365b9384752afa7a4dc31072b27b17368c 100644 (file)
@@ -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
index 4213e97eb8129e00efecea9ca051e07b53c1bd6b..c7ae991b7dd57b4c56d4e2a551c14fdccd7353f2 100644 (file)
@@ -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
index 474e89b70a8db1f6d89b34c557479dad6ddbd308..fbc7b0fdd1898c13edd85c08f5cf756825206cdb 100644 (file)
@@ -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
index be0c3dc320ff57a2cad515202f522483f0b50890..6c530ee449eeab9b25adf656532292a663d69555 100644 (file)
@@ -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.
index d7259b92a0e593b7f40cec204ef510258aec3e3a..63dd4a249b48e5185fd85a169e0ef05d2685fd19 100644 (file)
@@ -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
index 9ce7f836a1dd05dbc8416bb8e64dc2d0cfe4a074..d20a57d3a4ae4a98c97dc36bed8b5f9ae5125a3e 100644 (file)
@@ -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
index b7a980e6cbf528291fb7308ec52006304356a056..d56435b194db95a111499a8de7f2101b9eb3147b 100644 (file)
@@ -136,12 +136,12 @@ FiniteElementData<dim>::FiniteElementData(
 template <int dim>
 FiniteElementData<dim>::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])
index 0cb01fa4eedeb839498fd4acc655a50599fe6ca8..5dce5b309cf34bcc28705c5b7efb279370488f72 100644 (file)
@@ -73,16 +73,16 @@ MappingCartesian<dim, spacedim>::preserves_vertex_locations() const
 template <int dim, int spacedim>
 bool
 MappingCartesian<dim, spacedim>::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();
 }
 
 
index 577aa3924d534ea746f33bd18d2d1bf7290191d6..3a4cc76024e54aa8639a0d96475440e6c5e2bdc5 100644 (file)
@@ -2311,16 +2311,16 @@ MappingFE<dim, spacedim>::get_bounding_box(
 template <int dim, int spacedim>
 bool
 MappingFE<dim, spacedim>::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;
 }
 
 
index 52fd7f8f4d01d74a6c0aaaee42315c2fc7ccdf5a..cc4281045cb000d6a2fc4afafd4cdabe0931ce57 100644 (file)
@@ -349,16 +349,16 @@ MappingFEField<dim, spacedim, VectorType, void>::preserves_vertex_locations()
 template <int dim, int spacedim, typename VectorType>
 bool
 MappingFEField<dim, spacedim, VectorType, void>::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;
 }
 
 
index 4c130a9a5c7a165b9bd0588eb61c7d8abf1add50..6a5c7d0622a3d915e499385ca93db069afdc02f9 100644 (file)
@@ -562,15 +562,16 @@ MappingQ<dim, spacedim>::get_bounding_box(
 template <int dim, int spacedim>
 bool
 MappingQ<dim, spacedim>::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();
 }
 
 
index 3e420a216024611600d2c6b7ade1cdb8271d978c..51f6966cbe7f5aba4d00f46dac36fcc7fac00063 100644 (file)
@@ -1656,15 +1656,16 @@ MappingQGeneric<dim, spacedim>::get_bounding_box(
 template <int dim, int spacedim>
 bool
 MappingQGeneric<dim, spacedim>::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();
 }
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.