]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Also move get_hypercube/simplex() into namespace ReferenceCells.
authorWolfgang Bangerth <bangerth@colostate.edu>
Mon, 8 Feb 2021 04:46:04 +0000 (21:46 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Mon, 8 Feb 2021 16:20:55 +0000 (09:20 -0700)
29 files changed:
include/deal.II/base/qprojector.h
include/deal.II/fe/fe_poly_face.h
include/deal.II/fe/mapping_q1.h
include/deal.II/grid/grid_tools.h
include/deal.II/grid/grid_tools_cache.h
include/deal.II/grid/reference_cell.h
include/deal.II/matrix_free/mapping_info.templates.h
include/deal.II/matrix_free/matrix_free.templates.h
include/deal.II/matrix_free/shape_info.templates.h
include/deal.II/numerics/vector_tools_constraints.h
include/deal.II/numerics/vector_tools_project.templates.h
include/deal.II/particles/generators.h
source/base/data_out_base.cc
source/base/qprojector.cc
source/base/tensor_product_polynomials.cc
source/fe/fe_nedelec.cc
source/fe/fe_nothing.cc
source/fe/fe_q_base.cc
source/fe/mapping_cartesian.cc
source/fe/mapping_fe_field.cc
source/fe/mapping_manifold.cc
source/fe/mapping_q_generic.cc
source/grid/grid_generator.cc
source/grid/manifold.cc
source/grid/tria.cc
source/multigrid/mg_tools.cc
source/numerics/data_out.cc
source/simplex/fe_lib.cc
tests/simplex/cell_measure_01.cc

index e2f279ca476c58049c397e993d24df6578c2834e..739512014c003c5e7c2640b2ff40c0fdbb491fa1 100644 (file)
@@ -579,7 +579,7 @@ template <int dim>
 Quadrature<dim> inline QProjector<dim>::project_to_all_faces(
   const Quadrature<dim - 1> &quadrature)
 {
-  return project_to_all_faces(ReferenceCell::get_hypercube<dim>(), quadrature);
+  return project_to_all_faces(ReferenceCells::get_hypercube<dim>(), quadrature);
 }
 
 
index 3038921d24837c057a1aed9d542029975202d20b..85ecba57138870bcd4ee32f3b18c58c07cbdb7c6 100644 (file)
@@ -178,7 +178,7 @@ protected:
       update_flags,
       mapping,
       hp::QCollection<dim - 1>(QProjector<dim - 1>::project_to_all_children(
-        ReferenceCell::get_hypercube<dim - 1>(), quadrature)),
+        ReferenceCells::get_hypercube<dim - 1>(), quadrature)),
       output_data);
   }
 
index a4a6ccf64eabd98604d3234ef8bd35f344256783..b5712068bc1deed51ba30f5655714dd4f0a26ce1 100644 (file)
@@ -84,7 +84,7 @@ public:
  * @note The use of this object should be avoided since it is only applicable
  *   in cases where a mesh consists exclusively of quadrilaterals or hexahedra.
  *   Use
- * `ReferenceCell::get_hypercube<dim>().get_default_linear_mapping()`
+ * `ReferenceCells::get_hypercube<dim>().get_default_linear_mapping()`
  *   instead.
  */
 template <int dim, int spacedim = dim>
index 0a57525cc0708334a14b2f91f70326a755ecd433..44e2e4895defe8fda9abb16bf2c9e4bef3f38a95 100644 (file)
@@ -176,7 +176,7 @@ namespace GridTools
   double
   volume(const Triangulation<dim, spacedim> &tria,
          const Mapping<dim, spacedim> &      mapping =
-           (ReferenceCell::get_hypercube<dim>()
+           (ReferenceCells::get_hypercube<dim>()
               .template get_default_linear_mapping<dim, spacedim>()));
 
   /**
@@ -194,7 +194,7 @@ namespace GridTools
   minimal_cell_diameter(
     const Triangulation<dim, spacedim> &triangulation,
     const Mapping<dim, spacedim> &      mapping =
-      (ReferenceCell::get_hypercube<dim>()
+      (ReferenceCells::get_hypercube<dim>()
          .template get_default_linear_mapping<dim, spacedim>()));
 
   /**
@@ -212,7 +212,7 @@ namespace GridTools
   maximal_cell_diameter(
     const Triangulation<dim, spacedim> &triangulation,
     const Mapping<dim, spacedim> &      mapping =
-      (ReferenceCell::get_hypercube<dim>()
+      (ReferenceCells::get_hypercube<dim>()
          .template get_default_linear_mapping<dim, spacedim>()));
 
   /**
@@ -1044,7 +1044,7 @@ namespace GridTools
   extract_used_vertices(
     const Triangulation<dim, spacedim> &container,
     const Mapping<dim, spacedim> &      mapping =
-      (ReferenceCell::get_hypercube<dim>()
+      (ReferenceCells::get_hypercube<dim>()
          .template get_default_linear_mapping<dim, spacedim>()));
 
   /**
@@ -1872,7 +1872,7 @@ namespace GridTools
     const typename Triangulation<dim, spacedim>::active_cell_iterator &cell,
     const Point<spacedim> &                                            position,
     const Mapping<dim, spacedim> &                                     mapping =
-      (ReferenceCell::get_hypercube<dim>()
+      (ReferenceCells::get_hypercube<dim>()
          .template get_default_linear_mapping<dim, spacedim>()));
 
   /**
@@ -3272,7 +3272,7 @@ namespace GridTools
                 !cell->face(face)->at_boundary())
               {
                 Assert(cell->reference_cell() ==
-                         ReferenceCell::get_hypercube<dim>(),
+                         ReferenceCells::get_hypercube<dim>(),
                        ExcNotImplemented());
 
                 // this line has children
@@ -3292,7 +3292,7 @@ namespace GridTools
                 !cell->face(face)->at_boundary())
               {
                 Assert(cell->reference_cell() ==
-                         ReferenceCell::get_hypercube<dim>(),
+                         ReferenceCells::get_hypercube<dim>(),
                        ExcNotImplemented());
 
                 // this face has hanging nodes
index 6c326bf31e407b68f00a4548f1781ff9b87ccb6d..d8ea235b0312713ac6326cb2ab846fbe26885145 100644 (file)
@@ -76,7 +76,7 @@ namespace GridTools
      */
     Cache(const Triangulation<dim, spacedim> &tria,
           const Mapping<dim, spacedim> &      mapping =
-            (ReferenceCell::get_hypercube<dim>()
+            (ReferenceCells::get_hypercube<dim>()
                .template get_default_linear_mapping<dim, spacedim>()));
 
     /**
index e6341c7b92e40f2904174736ec0a57a02854aa75..338310047d5244add03ff5bbe0cdb605d4af734e 100644 (file)
@@ -80,24 +80,6 @@ namespace internal
 class ReferenceCell
 {
 public:
-  /**
-   * Return the correct simplex reference cell type for the given dimension
-   * `dim`. Depending on the template argument `dim`, this function returns a
-   * reference to either Vertex, Triangle, or Tetrahedron.
-   */
-  template <int dim>
-  static constexpr const ReferenceCell &
-  get_simplex();
-
-  /**
-   * Return the correct hypercube reference cell type for the given dimension
-   * `dim`. Depending on the template argument `dim`, this function returns a
-   * reference to either Vertex, Quadrilateral, or Hexahedron.
-   */
-  template <int dim>
-  static constexpr const ReferenceCell &
-  get_hypercube();
-
   /**
    * Return the correct ReferenceCell for a given structural
    * dimension and number of vertices. For example, if `dim==2` and
@@ -297,12 +279,6 @@ private:
 
 
 
-inline constexpr ReferenceCell::ReferenceCell()
-  : ReferenceCell(static_cast<std::uint8_t>(-1))
-{}
-
-
-
 inline constexpr ReferenceCell::ReferenceCell(const std::uint8_t kind)
   : kind(kind)
 {}
@@ -381,10 +357,34 @@ namespace ReferenceCells
   DEAL_II_CONSTEXPR const ReferenceCell Invalid =
     internal::ReferenceCell::make_reference_cell_from_int(
       static_cast<std::uint8_t>(-1));
+
+  /**
+   * Return the correct simplex reference cell type for the given dimension
+   * `dim`. Depending on the template argument `dim`, this function returns a
+   * reference to either Vertex, Triangle, or Tetrahedron.
+   */
+  template <int dim>
+  constexpr const ReferenceCell &
+  get_simplex();
+
+  /**
+   * Return the correct hypercube reference cell type for the given dimension
+   * `dim`. Depending on the template argument `dim`, this function returns a
+   * reference to either Vertex, Quadrilateral, or Hexahedron.
+   */
+  template <int dim>
+  constexpr const ReferenceCell &
+  get_hypercube();
 } // namespace ReferenceCells
 
 
 
+inline constexpr ReferenceCell::ReferenceCell()
+  : ReferenceCell(ReferenceCells::Invalid)
+{}
+
+
+
 template <class Archive>
 inline void
 ReferenceCell::serialize(Archive &archive, const unsigned int /*version*/)
@@ -504,48 +504,50 @@ ReferenceCell::get_dimension() const
 
 
 
-template <int dim>
-inline constexpr const ReferenceCell &
-ReferenceCell::get_simplex()
+namespace ReferenceCells
 {
-  switch (dim)
-    {
-      case 0:
-        return ReferenceCells::Vertex;
-      case 1:
-        return ReferenceCells::Line;
-      case 2:
-        return ReferenceCells::Triangle;
-      case 3:
-        return ReferenceCells::Tetrahedron;
-      default:
-        Assert(false, ExcNotImplemented());
-        return ReferenceCells::Invalid;
-    }
-}
-
+  template <int dim>
+  inline constexpr const ReferenceCell &
+  get_simplex()
+  {
+    switch (dim)
+      {
+        case 0:
+          return ReferenceCells::Vertex;
+        case 1:
+          return ReferenceCells::Line;
+        case 2:
+          return ReferenceCells::Triangle;
+        case 3:
+          return ReferenceCells::Tetrahedron;
+        default:
+          Assert(false, ExcNotImplemented());
+          return ReferenceCells::Invalid;
+      }
+  }
 
 
-template <int dim>
-inline constexpr const ReferenceCell &
-ReferenceCell::get_hypercube()
-{
-  switch (dim)
-    {
-      case 0:
-        return ReferenceCells::Vertex;
-      case 1:
-        return ReferenceCells::Line;
-      case 2:
-        return ReferenceCells::Quadrilateral;
-      case 3:
-        return ReferenceCells::Hexahedron;
-      default:
-        Assert(false, ExcNotImplemented());
-        return ReferenceCells::Invalid;
-    }
-}
 
+  template <int dim>
+  inline constexpr const ReferenceCell &
+  get_hypercube()
+  {
+    switch (dim)
+      {
+        case 0:
+          return ReferenceCells::Vertex;
+        case 1:
+          return ReferenceCells::Line;
+        case 2:
+          return ReferenceCells::Quadrilateral;
+        case 3:
+          return ReferenceCells::Hexahedron;
+        default:
+          Assert(false, ExcNotImplemented());
+          return ReferenceCells::Invalid;
+      }
+  }
+} // namespace ReferenceCells
 
 
 inline ReferenceCell
@@ -596,7 +598,7 @@ ReferenceCell::d_linear_shape_function(const Point<dim> & xi,
                                        const unsigned int i) const
 {
   AssertDimension(dim, get_dimension());
-  if (*this == get_hypercube<dim>())
+  if (*this == ReferenceCells::get_hypercube<dim>())
     return GeometryInfo<dim>::d_linear_shape_function(xi, i);
 
   if (*this ==
@@ -690,7 +692,7 @@ ReferenceCell::d_linear_shape_function_gradient(const Point<dim> & xi,
                                                 const unsigned int i) const
 {
   AssertDimension(dim, get_dimension());
-  if (*this == get_hypercube<dim>())
+  if (*this == ReferenceCells::get_hypercube<dim>())
     return GeometryInfo<dim>::d_linear_shape_function_gradient(xi, i);
 
   if (*this ==
@@ -722,7 +724,7 @@ ReferenceCell::unit_tangential_vectors(const unsigned int face_no,
   AssertDimension(dim, get_dimension());
   AssertIndexRange(i, dim - 1);
 
-  if (*this == get_hypercube<dim>())
+  if (*this == ReferenceCells::get_hypercube<dim>())
     {
       AssertIndexRange(face_no, GeometryInfo<dim>::faces_per_cell);
       return GeometryInfo<dim>::unit_tangential_vectors[face_no][i];
index 7c5d3c34d79d8c4c38c804ced4cdcd617782b0bc..d51a855ba75cbf277bd6d9665f6725e77f546c76 100644 (file)
@@ -1756,7 +1756,7 @@ namespace internal
         Assert(index < dim, ExcInternalError());
 
         if ((reference_cell == dealii::ReferenceCells::Invalid ||
-             reference_cell == dealii::ReferenceCell::get_hypercube<dim>()) ==
+             reference_cell == dealii::ReferenceCells::get_hypercube<dim>()) ==
             false)
           {
 #ifdef DEAL_II_WITH_SIMPLEX_SUPPORT
index 000280ff1e2734ac9382e7ced9d98c1e36f32092..df3f382117b05f57569a63202c37b6bab213470f 100644 (file)
@@ -1481,7 +1481,7 @@ MatrixFree<dim, Number, VectorizedArrayType>::initialize_indices(
              ++fe_no)
           shape_info_dummy(c, fe_no).reinit(
             dof_handlers[no]->get_fe(fe_no).reference_cell() ==
-                ReferenceCell::get_hypercube<dim>() ?
+                ReferenceCells::get_hypercube<dim>() ?
               quad :
               quad_simplex,
             dof_handlers[no]->get_fe(fe_no),
index e4f9dbd208102a5f3541a863ccce1b05fdc684a3..1ec957421eaad8764fcca8db11419996a23147c6 100644 (file)
@@ -317,7 +317,7 @@ namespace internal
           try
             {
               const dealii::ReferenceCell reference_cell =
-                dealii::ReferenceCell::get_simplex<dim>();
+                dealii::ReferenceCells::get_simplex<dim>();
 
               const auto quad_face  = get_face_quadrature(quad);
               this->n_q_points_face = quad_face.size();
index e005f6b21953ea624d210ab9a6bb6cc7c63a1d28..7d41e342a49f13a15e7b53b7151c640ac3ae822e 100644 (file)
@@ -280,7 +280,7 @@ namespace VectorTools
       &                           function_map,
     AffineConstraints<double> &   constraints,
     const Mapping<dim, spacedim> &mapping =
-      (ReferenceCell::get_hypercube<dim>()
+      (ReferenceCells::get_hypercube<dim>()
          .template get_default_linear_mapping<dim, spacedim>()));
 
   /**
@@ -303,7 +303,7 @@ namespace VectorTools
     const std::set<types::boundary_id> &boundary_ids,
     AffineConstraints<double> &         constraints,
     const Mapping<dim, spacedim> &      mapping =
-      (ReferenceCell::get_hypercube<dim>()
+      (ReferenceCells::get_hypercube<dim>()
          .template get_default_linear_mapping<dim, spacedim>()));
 
   /**
@@ -332,7 +332,7 @@ namespace VectorTools
       &                           function_map,
     AffineConstraints<double> &   constraints,
     const Mapping<dim, spacedim> &mapping =
-      (ReferenceCell::get_hypercube<dim>()
+      (ReferenceCells::get_hypercube<dim>()
          .template get_default_linear_mapping<dim, spacedim>()));
 
   /**
@@ -351,7 +351,7 @@ namespace VectorTools
     const std::set<types::boundary_id> &boundary_ids,
     AffineConstraints<double> &         constraints,
     const Mapping<dim, spacedim> &      mapping =
-      (ReferenceCell::get_hypercube<dim>()
+      (ReferenceCells::get_hypercube<dim>()
          .template get_default_linear_mapping<dim, spacedim>()));
 
   //@}
index 4c543dbf2125a8e736f47068502df1c72035e446..dabf0be28dea03b1094ab4dbe2840b78e3de1862 100644 (file)
@@ -183,7 +183,8 @@ namespace VectorTools
 
       Quadrature<dim> quadrature_mf;
 
-      if (dof.get_fe(0).reference_cell() == ReferenceCell::get_hypercube<dim>())
+      if (dof.get_fe(0).reference_cell() ==
+          ReferenceCells::get_hypercube<dim>())
         quadrature_mf = QGauss<dim>(dof.get_fe().degree + 2);
       else
         // TODO: since we have currently only implemented a handful quadrature
index a45fd50c09b60473e75e081aeb0f2dbfdf04772c..b23cda76db90d25f993006dfff554e8367927020 100644 (file)
@@ -69,7 +69,7 @@ namespace Particles
       const std::vector<Point<dim>> &     particle_reference_locations,
       ParticleHandler<dim, spacedim> &    particle_handler,
       const Mapping<dim, spacedim> &      mapping =
-        (ReferenceCell::get_hypercube<dim>()
+        (ReferenceCells::get_hypercube<dim>()
            .template get_default_linear_mapping<dim, spacedim>()));
 
     /**
@@ -108,7 +108,7 @@ namespace Particles
       const types::particle_index                                        id,
       std::mt19937 &                random_number_generator,
       const Mapping<dim, spacedim> &mapping =
-        (ReferenceCell::get_hypercube<dim>()
+        (ReferenceCells::get_hypercube<dim>()
            .template get_default_linear_mapping<dim, spacedim>()));
 
     /**
@@ -164,7 +164,7 @@ namespace Particles
       const types::particle_index         n_particles_to_create,
       ParticleHandler<dim, spacedim> &    particle_handler,
       const Mapping<dim, spacedim> &      mapping =
-        (ReferenceCell::get_hypercube<dim>()
+        (ReferenceCells::get_hypercube<dim>()
            .template get_default_linear_mapping<dim, spacedim>()),
       const unsigned int random_number_seed = 5432);
 
@@ -211,7 +211,7 @@ namespace Particles
         &                             global_bounding_boxes,
       ParticleHandler<dim, spacedim> &particle_handler,
       const Mapping<dim, spacedim> &  mapping =
-        (ReferenceCell::get_hypercube<dim>()
+        (ReferenceCells::get_hypercube<dim>()
            .template get_default_linear_mapping<dim, spacedim>()),
       const ComponentMask &                   components = ComponentMask(),
       const std::vector<std::vector<double>> &properties = {});
@@ -256,7 +256,7 @@ namespace Particles
         &                             global_bounding_boxes,
       ParticleHandler<dim, spacedim> &particle_handler,
       const Mapping<dim, spacedim> &  mapping =
-        (ReferenceCell::get_hypercube<dim>()
+        (ReferenceCells::get_hypercube<dim>()
            .template get_default_linear_mapping<dim, spacedim>()),
       const std::vector<std::vector<double>> &properties = {});
   } // namespace Generators
index bc6a797e137916db672134323a35d369d9b83e51..746e2d965359c3d97b120f62a48d7501a4f86ff3 100644 (file)
@@ -293,7 +293,7 @@ namespace DataOutBase
                                         (n_data_sets + spacedim) :
                                         n_data_sets,
                                       patch.data.n_rows()));
-          Assert(patch.reference_cell != ReferenceCell::get_hypercube<dim>() ||
+          Assert(patch.reference_cell != ReferenceCells::get_hypercube<dim>() ||
                    (n_data_sets == 0) ||
                    (patch.data.n_cols() ==
                     Utilities::fixed_power<dim>(n_subdivisions + 1)),
@@ -615,7 +615,7 @@ namespace
 
     if (write_higher_order_cells)
       {
-        if (patch.reference_cell == ReferenceCell::get_hypercube<dim>())
+        if (patch.reference_cell == ReferenceCells::get_hypercube<dim>())
           {
             const std::array<unsigned int, 4> cell_type_by_dim{
               {VTK_VERTEX,
@@ -671,7 +671,7 @@ namespace
         vtk_cell_id[0] = VTK_PYRAMID;
         vtk_cell_id[1] = 1;
       }
-    else if (patch.reference_cell == ReferenceCell::get_hypercube<dim>())
+    else if (patch.reference_cell == ReferenceCells::get_hypercube<dim>())
       {
         const std::array<unsigned int, 4> cell_type_by_dim{
           {VTK_VERTEX, VTK_LINE, VTK_QUAD, VTK_HEXAHEDRON}};
@@ -683,7 +683,7 @@ namespace
         Assert(false, ExcNotImplemented());
       }
 
-    if (patch.reference_cell != ReferenceCell::get_hypercube<dim>() ||
+    if (patch.reference_cell != ReferenceCells::get_hypercube<dim>() ||
         write_higher_order_cells)
       vtk_cell_id[2] = patch.data.n_cols();
     else
@@ -919,7 +919,7 @@ namespace
     for (const auto &patch : patches)
       {
         // The following formula doesn't hold for non-tensor products.
-        if (patch.reference_cell == ReferenceCell::get_hypercube<dim>())
+        if (patch.reference_cell == ReferenceCells::get_hypercube<dim>())
           {
             n_nodes += Utilities::fixed_power<dim>(patch.n_subdivisions + 1);
             n_cells += Utilities::fixed_power<dim>(patch.n_subdivisions);
@@ -950,7 +950,7 @@ namespace
     for (const auto &patch : patches)
       {
         // The following formulas don't hold for non-tensor products.
-        if (patch.reference_cell == ReferenceCell::get_hypercube<dim>())
+        if (patch.reference_cell == ReferenceCells::get_hypercube<dim>())
           {
             n_nodes += Utilities::fixed_power<dim>(patch.n_subdivisions + 1);
 
@@ -1866,7 +1866,7 @@ namespace DataOutBase
     : patch_index(no_neighbor)
     , n_subdivisions(1)
     , points_are_available(false)
-    , reference_cell(ReferenceCell::get_hypercube<dim>())
+    , reference_cell(ReferenceCells::get_hypercube<dim>())
   // all the other data has a constructor of its own, except for the "neighbors"
   // field, which we set to invalid values.
   {
@@ -1968,7 +1968,7 @@ namespace DataOutBase
   Patch<0, spacedim>::Patch()
     : patch_index(no_neighbor)
     , points_are_available(false)
-    , reference_cell(ReferenceCell::get_hypercube<0>())
+    , reference_cell(ReferenceCells::get_hypercube<0>())
   {
     Assert(spacedim <= 3, ExcNotImplemented());
   }
@@ -2631,7 +2631,7 @@ namespace DataOutBase
         // special treatment of simplices since they are not subdivided, such
         // that no new nodes have to be created, but the precomputed ones can be
         // used
-        if (patch.reference_cell != ReferenceCell::get_hypercube<dim>())
+        if (patch.reference_cell != ReferenceCells::get_hypercube<dim>())
           {
             Point<spacedim> node;
 
@@ -2675,7 +2675,7 @@ namespace DataOutBase
     for (const auto &patch : patches)
       {
         // special treatment of simplices since they are not subdivided
-        if (patch.reference_cell != ReferenceCell::get_hypercube<dim>())
+        if (patch.reference_cell != ReferenceCells::get_hypercube<dim>())
           {
             out.write_cell_single(count++,
                                   first_vertex_of_patch,
@@ -2727,7 +2727,7 @@ namespace DataOutBase
 
     for (const auto &patch : patches)
       {
-        if (patch.reference_cell != ReferenceCell::get_hypercube<dim>())
+        if (patch.reference_cell != ReferenceCells::get_hypercube<dim>())
           {
             connectivity.resize(patch.data.n_cols());
 
@@ -8668,16 +8668,16 @@ XDMFEntry::get_xdmf_content(const unsigned int indent_level) const
     {
       case 0:
         return get_xdmf_content(indent_level,
-                                ReferenceCell::get_hypercube<0>());
+                                ReferenceCells::get_hypercube<0>());
       case 1:
         return get_xdmf_content(indent_level,
-                                ReferenceCell::get_hypercube<1>());
+                                ReferenceCells::get_hypercube<1>());
       case 2:
         return get_xdmf_content(indent_level,
-                                ReferenceCell::get_hypercube<2>());
+                                ReferenceCells::get_hypercube<2>());
       case 3:
         return get_xdmf_content(indent_level,
-                                ReferenceCell::get_hypercube<3>());
+                                ReferenceCells::get_hypercube<3>());
       default:
         Assert(false, ExcNotImplemented());
     }
index 9535a117bee1a023ece875ab1a33ceccdfb281e8..0a310707ce00a4b389b7a3f9bd37b2f95bf884f4 100644 (file)
@@ -1239,7 +1239,7 @@ Quadrature<dim>
 QProjector<dim>::project_to_child(const Quadrature<dim> &quadrature,
                                   const unsigned int     child_no)
 {
-  return project_to_child(ReferenceCell::get_hypercube<dim>(),
+  return project_to_child(ReferenceCells::get_hypercube<dim>(),
                           quadrature,
                           child_no);
 }
@@ -1252,7 +1252,7 @@ QProjector<dim>::project_to_child(const ReferenceCell    reference_cell,
                                   const Quadrature<dim> &quadrature,
                                   const unsigned int     child_no)
 {
-  Assert(reference_cell == ReferenceCell::get_hypercube<dim>(),
+  Assert(reference_cell == ReferenceCells::get_hypercube<dim>(),
          ExcNotImplemented());
   (void)reference_cell;
 
@@ -1282,7 +1282,7 @@ template <int dim>
 Quadrature<dim>
 QProjector<dim>::project_to_all_children(const Quadrature<dim> &quadrature)
 {
-  return project_to_all_children(ReferenceCell::get_hypercube<dim>(),
+  return project_to_all_children(ReferenceCells::get_hypercube<dim>(),
                                  quadrature);
 }
 
@@ -1293,7 +1293,7 @@ Quadrature<dim>
 QProjector<dim>::project_to_all_children(const ReferenceCell    reference_cell,
                                          const Quadrature<dim> &quadrature)
 {
-  Assert(reference_cell == ReferenceCell::get_hypercube<dim>(),
+  Assert(reference_cell == ReferenceCells::get_hypercube<dim>(),
          ExcNotImplemented());
   (void)reference_cell;
 
@@ -1325,7 +1325,7 @@ QProjector<dim>::project_to_line(const Quadrature<1> &quadrature,
                                  const Point<dim> &   p1,
                                  const Point<dim> &   p2)
 {
-  return project_to_line(ReferenceCell::get_hypercube<dim>(),
+  return project_to_line(ReferenceCells::get_hypercube<dim>(),
                          quadrature,
                          p1,
                          p2);
@@ -1340,7 +1340,7 @@ QProjector<dim>::project_to_line(const ReferenceCell  reference_cell,
                                  const Point<dim> &   p1,
                                  const Point<dim> &   p2)
 {
-  Assert(reference_cell == ReferenceCell::get_hypercube<dim>(),
+  Assert(reference_cell == ReferenceCells::get_hypercube<dim>(),
          ExcNotImplemented());
   (void)reference_cell;
 
@@ -1369,7 +1369,7 @@ QProjector<dim>::DataSetDescriptor::face(const unsigned int face_no,
                                          const bool         face_rotation,
                                          const unsigned int n_quadrature_points)
 {
-  return face(ReferenceCell::get_hypercube<dim>(),
+  return face(ReferenceCells::get_hypercube<dim>(),
               face_no,
               face_orientation,
               face_flip,
@@ -1401,7 +1401,7 @@ QProjector<dim>::DataSetDescriptor::face(const ReferenceCell reference_cell,
         }
     }
 
-  Assert(reference_cell == ReferenceCell::get_hypercube<dim>(),
+  Assert(reference_cell == ReferenceCells::get_hypercube<dim>(),
          ExcNotImplemented());
 
   Assert(face_no < GeometryInfo<dim>::faces_per_cell, ExcInternalError());
@@ -1519,7 +1519,7 @@ QProjector<dim>::DataSetDescriptor::face(
         }
     }
 
-  Assert(reference_cell == ReferenceCell::get_hypercube<dim>(),
+  Assert(reference_cell == ReferenceCells::get_hypercube<dim>(),
          ExcNotImplemented());
 
   Assert(face_no < GeometryInfo<dim>::faces_per_cell, ExcInternalError());
@@ -1982,7 +1982,7 @@ Quadrature<dim>
 QProjector<dim>::project_to_face(const SubQuadrature &quadrature,
                                  const unsigned int   face_no)
 {
-  return project_to_face(ReferenceCell::get_hypercube<dim>(),
+  return project_to_face(ReferenceCells::get_hypercube<dim>(),
                          quadrature,
                          face_no);
 }
@@ -1995,7 +1995,7 @@ QProjector<dim>::project_to_face(const ReferenceCell  reference_cell,
                                  const SubQuadrature &quadrature,
                                  const unsigned int   face_no)
 {
-  Assert(reference_cell == ReferenceCell::get_hypercube<dim>(),
+  Assert(reference_cell == ReferenceCells::get_hypercube<dim>(),
          ExcNotImplemented());
   (void)reference_cell;
 
@@ -2013,7 +2013,7 @@ QProjector<dim>::project_to_subface(const SubQuadrature &          quadrature,
                                     const unsigned int             subface_no,
                                     const RefinementCase<dim - 1> &ref_case)
 {
-  return project_to_subface(ReferenceCell::get_hypercube<dim>(),
+  return project_to_subface(ReferenceCells::get_hypercube<dim>(),
                             quadrature,
                             face_no,
                             subface_no,
@@ -2030,7 +2030,7 @@ QProjector<dim>::project_to_subface(const ReferenceCell  reference_cell,
                                     const unsigned int   subface_no,
                                     const RefinementCase<dim - 1> &ref_case)
 {
-  Assert(reference_cell == ReferenceCell::get_hypercube<dim>(),
+  Assert(reference_cell == ReferenceCells::get_hypercube<dim>(),
          ExcNotImplemented());
   (void)reference_cell;
 
index ac9a0a8af67eb2de0378b2dfe7d4fee502234095..4917076f6452cbc2396055a5fd7c16c4c32c9e00 100644 (file)
@@ -382,7 +382,7 @@ TensorProductPolynomials<dim, PolynomialType>::evaluate(
       else
         for (indices[0] = 0; indices[0] < n_polynomials; ++indices[0], ++ind)
           {
-            unsigned int i = index_map_inverse[ind];
+            const unsigned int i = index_map_inverse[ind];
 
             if (update_values)
               {
index 996609a80b02f576170349391beddaa46434c603..d8867eaefc7ef7f5de9f8dc4c7986ec9acd61d66 100644 (file)
@@ -381,7 +381,7 @@ FE_Nedelec<3>::initialize_support_points(const unsigned int order)
   const unsigned int         n_edge_points = reference_edge_quadrature.size();
   const Quadrature<dim - 1> &edge_quadrature =
     QProjector<dim - 1>::project_to_all_faces(
-      ReferenceCell::get_hypercube<dim - 1>(), reference_edge_quadrature);
+      ReferenceCells::get_hypercube<dim - 1>(), reference_edge_quadrature);
 
   if (order > 0)
     {
@@ -414,7 +414,7 @@ FE_Nedelec<3>::initialize_support_points(const unsigned int order)
                                                          q_point] =
               edge_quadrature.point(
                 QProjector<dim - 1>::DataSetDescriptor::face(
-                  ReferenceCell::get_hypercube<dim - 1>(),
+                  ReferenceCells::get_hypercube<dim - 1>(),
                   line,
                   true,
                   false,
@@ -515,7 +515,7 @@ FE_Nedelec<3>::initialize_support_points(const unsigned int order)
                                                          q_point] =
               edge_quadrature.point(
                 QProjector<dim - 1>::DataSetDescriptor::face(
-                  ReferenceCell::get_hypercube<dim - 1>(),
+                  ReferenceCells::get_hypercube<dim - 1>(),
                   line,
                   true,
                   false,
index 586d9ef140ec63d00943c83ba20d471d2eab39b7..1fe83c4f3ba68bc6fb1835964840259070762841 100644 (file)
@@ -51,7 +51,7 @@ FE_Nothing<dim, spacedim>::FE_Nothing(const ReferenceCell &type,
 template <int dim, int spacedim>
 FE_Nothing<dim, spacedim>::FE_Nothing(const unsigned int n_components,
                                       const bool         dominate)
-  : FE_Nothing<dim, spacedim>(ReferenceCell::get_hypercube<dim>(),
+  : FE_Nothing<dim, spacedim>(ReferenceCells::get_hypercube<dim>(),
                               n_components,
                               dominate)
 {}
@@ -75,7 +75,7 @@ FE_Nothing<dim, spacedim>::get_name() const
   namebuf << "FE_Nothing<" << Utilities::dim_string(dim, spacedim) << ">(";
 
   std::vector<std::string> name_components;
-  if (this->reference_cell() != ReferenceCell::get_hypercube<dim>())
+  if (this->reference_cell() != ReferenceCells::get_hypercube<dim>())
     name_components.push_back(this->reference_cell().to_string());
   if (this->n_components() > 1)
     name_components.push_back(std::to_string(this->n_components()));
index db96b251e461c181a6caebf4c585e8899ccb424a..122f0a30177a2ae1b62a436ada8492ea445f14ae 100644 (file)
@@ -263,22 +263,22 @@ struct FE_Q_Base<xdim, xspacedim>::Implementation
 
         // line 5: use line 9
         QProjector<dim - 1>::project_to_subface(
-          ReferenceCell::get_hypercube<dim - 1>(), qline, 0, 0, p_line);
+          ReferenceCells::get_hypercube<dim - 1>(), qline, 0, 0, p_line);
         for (unsigned int i = 0; i < n; ++i)
           constraint_points.push_back(p_line[i] + Point<dim - 1>(0.5, 0));
         // line 6: use line 10
         QProjector<dim - 1>::project_to_subface(
-          ReferenceCell::get_hypercube<dim - 1>(), qline, 0, 1, p_line);
+          ReferenceCells::get_hypercube<dim - 1>(), qline, 0, 1, p_line);
         for (unsigned int i = 0; i < n; ++i)
           constraint_points.push_back(p_line[i] + Point<dim - 1>(0.5, 0));
         // line 7: use line 13
         QProjector<dim - 1>::project_to_subface(
-          ReferenceCell::get_hypercube<dim - 1>(), qline, 2, 0, p_line);
+          ReferenceCells::get_hypercube<dim - 1>(), qline, 2, 0, p_line);
         for (unsigned int i = 0; i < n; ++i)
           constraint_points.push_back(p_line[i] + Point<dim - 1>(0, 0.5));
         // line 8: use line 14
         QProjector<dim - 1>::project_to_subface(
-          ReferenceCell::get_hypercube<dim - 1>(), qline, 2, 1, p_line);
+          ReferenceCells::get_hypercube<dim - 1>(), qline, 2, 1, p_line);
         for (unsigned int i = 0; i < n; ++i)
           constraint_points.push_back(p_line[i] + Point<dim - 1>(0, 0.5));
 
@@ -291,7 +291,7 @@ struct FE_Q_Base<xdim, xspacedim>::Implementation
                ++subface)
             {
               QProjector<dim - 1>::project_to_subface(
-                ReferenceCell::get_hypercube<dim - 1>(),
+                ReferenceCells::get_hypercube<dim - 1>(),
                 qline,
                 face,
                 subface,
index 3837e8255fdfe302f481c30b612a38b91aaa2dbc..0cb01fa4eedeb839498fd4acc655a50599fe6ca8 100644 (file)
@@ -134,9 +134,8 @@ MappingCartesian<dim, spacedim>::get_face_data(
   AssertDimension(quadrature.size(), 1);
 
   std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase> data_ptr =
-    std::make_unique<InternalData>(
-      QProjector<dim>::project_to_all_faces(ReferenceCell::get_hypercube<dim>(),
-                                            quadrature[0]));
+    std::make_unique<InternalData>(QProjector<dim>::project_to_all_faces(
+      ReferenceCells::get_hypercube<dim>(), quadrature[0]));
   auto &data = dynamic_cast<InternalData &>(*data_ptr);
 
   // verify that we have computed the transitive hull of the required
@@ -161,7 +160,7 @@ MappingCartesian<dim, spacedim>::get_subface_data(
 {
   std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase> data_ptr =
     std::make_unique<InternalData>(QProjector<dim>::project_to_all_subfaces(
-      ReferenceCell::get_hypercube<dim>(), quadrature));
+      ReferenceCells::get_hypercube<dim>(), quadrature));
   auto &data = dynamic_cast<InternalData &>(*data_ptr);
 
   // verify that we have computed the transitive hull of the required
@@ -244,7 +243,7 @@ MappingCartesian<dim, spacedim>::maybe_update_face_quadrature_points(
   if (data.update_each & update_quadrature_points)
     {
       const auto offset = QProjector<dim>::DataSetDescriptor::face(
-        ReferenceCell::get_hypercube<dim>(),
+        ReferenceCells::get_hypercube<dim>(),
         face_no,
         cell->face_orientation(face_no),
         cell->face_flip(face_no),
@@ -277,7 +276,7 @@ MappingCartesian<dim, spacedim>::maybe_update_subface_quadrature_points(
   if (data.update_each & update_quadrature_points)
     {
       const auto offset = QProjector<dim>::DataSetDescriptor::subface(
-        ReferenceCell::get_hypercube<dim>(),
+        ReferenceCells::get_hypercube<dim>(),
         face_no,
         sub_no,
         cell->face_orientation(face_no),
index a1fa54b47a38a404f503a296aa952bdf2ed76fed..9859e547ecff400c335e19560c405e3290130f4e 100644 (file)
@@ -645,7 +645,7 @@ MappingFEField<dim, spacedim, VectorType, void>::get_face_data(
     std::make_unique<InternalData>(euler_dof_handler->get_fe(), fe_mask);
   auto &                data = dynamic_cast<InternalData &>(*data_ptr);
   const Quadrature<dim> q(
-    QProjector<dim>::project_to_all_faces(ReferenceCell::get_hypercube<dim>(),
+    QProjector<dim>::project_to_all_faces(ReferenceCells::get_hypercube<dim>(),
                                           quadrature[0]));
   this->compute_face_data(update_flags, q, quadrature[0].size(), data);
 
@@ -663,7 +663,7 @@ MappingFEField<dim, spacedim, VectorType, void>::get_subface_data(
     std::make_unique<InternalData>(euler_dof_handler->get_fe(), fe_mask);
   auto &                data = dynamic_cast<InternalData &>(*data_ptr);
   const Quadrature<dim> q(QProjector<dim>::project_to_all_subfaces(
-    ReferenceCell::get_hypercube<dim>(), quadrature));
+    ReferenceCells::get_hypercube<dim>(), quadrature));
   this->compute_face_data(update_flags, q, quadrature.size(), data);
 
   return data_ptr;
@@ -1727,7 +1727,7 @@ MappingFEField<dim, spacedim, VectorType, void>::fill_fe_face_values(
       face_no,
       numbers::invalid_unsigned_int,
       QProjector<dim>::DataSetDescriptor::face(
-        ReferenceCell::get_hypercube<dim>(),
+        ReferenceCells::get_hypercube<dim>(),
         face_no,
         cell->face_orientation(face_no),
         cell->face_flip(face_no),
@@ -1768,7 +1768,7 @@ MappingFEField<dim, spacedim, VectorType, void>::fill_fe_subface_values(
       face_no,
       numbers::invalid_unsigned_int,
       QProjector<dim>::DataSetDescriptor::subface(
-        ReferenceCell::get_hypercube<dim>(),
+        ReferenceCells::get_hypercube<dim>(),
         face_no,
         subface_no,
         cell->face_orientation(face_no),
index bc67670abb91c592f1c3a472f867c2caae2de03d..988aa5d661f6513ab51cfff8259b87e42935dff6 100644 (file)
@@ -292,7 +292,7 @@ MappingManifold<dim, spacedim>::get_face_data(
   auto &data = dynamic_cast<InternalData &>(*data_ptr);
   data.initialize_face(this->requires_update_flags(update_flags),
                        QProjector<dim>::project_to_all_faces(
-                         ReferenceCell::get_hypercube<dim>(), quadrature[0]),
+                         ReferenceCells::get_hypercube<dim>(), quadrature[0]),
                        quadrature[0].size());
 
   return data_ptr;
@@ -311,7 +311,7 @@ MappingManifold<dim, spacedim>::get_subface_data(
   auto &data = dynamic_cast<InternalData &>(*data_ptr);
   data.initialize_face(this->requires_update_flags(update_flags),
                        QProjector<dim>::project_to_all_subfaces(
-                         ReferenceCell::get_hypercube<dim>(), quadrature),
+                         ReferenceCells::get_hypercube<dim>(), quadrature),
                        quadrature.size());
 
   return data_ptr;
@@ -1228,7 +1228,7 @@ MappingManifold<dim, spacedim>::fill_fe_face_values(
     face_no,
     numbers::invalid_unsigned_int,
     QProjector<dim>::DataSetDescriptor::face(
-      ReferenceCell::get_hypercube<dim>(),
+      ReferenceCells::get_hypercube<dim>(),
       face_no,
       cell->face_orientation(face_no),
       cell->face_flip(face_no),
@@ -1263,7 +1263,7 @@ MappingManifold<dim, spacedim>::fill_fe_subface_values(
     face_no,
     subface_no,
     QProjector<dim>::DataSetDescriptor::subface(
-      ReferenceCell::get_hypercube<dim>(),
+      ReferenceCells::get_hypercube<dim>(),
       face_no,
       subface_no,
       cell->face_orientation(face_no),
index f3d7e730372e80c20982b85d15a1f635f304d990..3e420a216024611600d2c6b7ade1cdb8271d978c 100644 (file)
@@ -887,7 +887,7 @@ MappingQGeneric<dim, spacedim>::get_face_data(
   auto &data = dynamic_cast<InternalData &>(*data_ptr);
   data.initialize_face(this->requires_update_flags(update_flags),
                        QProjector<dim>::project_to_all_faces(
-                         ReferenceCell::get_hypercube<dim>(), quadrature[0]),
+                         ReferenceCells::get_hypercube<dim>(), quadrature[0]),
                        quadrature[0].size());
 
   return data_ptr;
@@ -906,7 +906,7 @@ MappingQGeneric<dim, spacedim>::get_subface_data(
   auto &data = dynamic_cast<InternalData &>(*data_ptr);
   data.initialize_face(this->requires_update_flags(update_flags),
                        QProjector<dim>::project_to_all_subfaces(
-                         ReferenceCell::get_hypercube<dim>(), quadrature),
+                         ReferenceCells::get_hypercube<dim>(), quadrature),
                        quadrature.size());
 
   return data_ptr;
@@ -1172,7 +1172,7 @@ MappingQGeneric<dim, spacedim>::fill_fe_face_values(
     face_no,
     numbers::invalid_unsigned_int,
     QProjector<dim>::DataSetDescriptor::face(
-      ReferenceCell::get_hypercube<dim>(),
+      ReferenceCells::get_hypercube<dim>(),
       face_no,
       cell->face_orientation(face_no),
       cell->face_flip(face_no),
@@ -1220,7 +1220,7 @@ MappingQGeneric<dim, spacedim>::fill_fe_subface_values(
     face_no,
     subface_no,
     QProjector<dim>::DataSetDescriptor::subface(
-      ReferenceCell::get_hypercube<dim>(),
+      ReferenceCells::get_hypercube<dim>(),
       face_no,
       subface_no,
       cell->face_orientation(face_no),
index 973fdf201993567b49e479870466e1f30214e1ee..197d3504ba3c7a92aaad319d92f299afa21b1f05 100644 (file)
@@ -1722,7 +1722,7 @@ namespace GridGenerator
   {
     AssertDimension(dim, reference_cell.get_dimension());
 
-    if (reference_cell == ReferenceCell::get_hypercube<dim>())
+    if (reference_cell == ReferenceCells::get_hypercube<dim>())
       {
         GridGenerator::hyper_cube(tria, 0, 1);
       }
index 554990ea6f497d754fab9b8c10cefe2e6c703b74..48f8f9806a1e150dd974a7b35ca9e4a66f5c32b4 100644 (file)
@@ -897,7 +897,7 @@ FlatManifold<dim, spacedim>::normal_vector(
 
   const auto face_reference_cell = face->reference_cell();
 
-  if (face_reference_cell == ReferenceCell::get_hypercube<facedim>())
+  if (face_reference_cell == ReferenceCells::get_hypercube<facedim>())
     {
       for (unsigned int i = 0; i < facedim; ++i)
         xi[i] = 1. / 2;
index d0634815953c136ff0813a2bc4f30d0a16862733..1fd8e850c127d533313ad28f6764e50cb6bda31f 100644 (file)
@@ -13539,7 +13539,7 @@ Triangulation<dim, spacedim>::all_reference_cells_are_hyper_cube() const
                     "cells used by this triangulation if the "
                     "triangulation doesn't yet have any cells in it."));
   return (this->reference_cells.size() == 1 &&
-          this->reference_cells[0] == ReferenceCell::get_hypercube<dim>());
+          this->reference_cells[0] == ReferenceCells::get_hypercube<dim>());
 }
 
 
index d0bf64f84c4033a69579ed28e9b9d8e6311b0659..19e7047342e2b8935a8f4e250142f6381c33190e 100644 (file)
@@ -165,7 +165,7 @@ namespace MGTools
         // TODO: This assumes that the dofs per face on all faces coincide!
         const unsigned int face_no = 0;
 
-        Assert(fe.reference_cell() == ReferenceCell::get_hypercube<dim>(),
+        Assert(fe.reference_cell() == ReferenceCells::get_hypercube<dim>(),
                ExcNotImplemented());
 
         unsigned int increment =
@@ -345,7 +345,7 @@ namespace MGTools
 
         // TODO: This assumes that the dofs per face on all faces coincide!
         const unsigned int face_no = 0;
-        Assert(fe.reference_cell() == ReferenceCell::get_hypercube<dim>(),
+        Assert(fe.reference_cell() == ReferenceCells::get_hypercube<dim>(),
                ExcNotImplemented());
 
         Assert(couplings.n_rows() == fe.n_components(),
index 27358100c9a86e60791eac1874abef8373da5350..610e1b5060f6f54a4d22c2633392033dadbeb390 100644 (file)
@@ -148,7 +148,7 @@ DataOut<dim, DoFHandlerType>::build_one_patch(
        (cell_and_index->first->at_boundary() ||
         (DoFHandlerType::dimension != DoFHandlerType::space_dimension))) ||
       (cell_and_index->first->reference_cell() !=
-       ReferenceCell::get_hypercube<dim>()))
+       ReferenceCells::get_hypercube<dim>()))
     {
       Assert(patch.space_dim == DoFHandlerType::space_dimension,
              ExcInternalError());
index 9d0c897662a995a664111fcb013011c519ef371b..fef6d1f953c34d1857ad70b596d5c3c140d1a801 100644 (file)
@@ -1615,7 +1615,7 @@ namespace Simplex
       // basis.
       const auto polys = get_basis<dim>(degree);
       return FiniteElementData<dim>(get_dpo_vector<dim>(degree),
-                                    ReferenceCell::get_simplex<dim>(),
+                                    ReferenceCells::get_simplex<dim>(),
                                     1, // n_components
                                     polys.degree(),
                                     FiniteElementData<dim>::H1);
index 2c706767dd3b852b7a879240cc57aa65883fa542..a21e5837c8312d57ca884ace8aaa17e6fe117c1f 100644 (file)
@@ -47,7 +47,7 @@ process(const std::vector<Point<spacedim>> &vertices,
 
   AssertDimension(reference_cells.size(), 1);
 
-  if (reference_cells[0] == ReferenceCell::get_simplex<dim>())
+  if (reference_cells[0] == ReferenceCells::get_simplex<dim>())
     mapping = std::make_shared<MappingFE<dim>>(Simplex::FE_P<dim>(1));
   else if (reference_cells[0] == ReferenceCells::Wedge)
     mapping = std::make_shared<MappingFE<dim>>(Simplex::FE_WedgeP<dim>(1));

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.