]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make get_hypercube/simplex static members of ReferenceCell::Type. 11602/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Thu, 21 Jan 2021 19:48:58 +0000 (12:48 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Fri, 22 Jan 2021 00:07:01 +0000 (17:07 -0700)
26 files changed:
include/deal.II/base/qprojector.h
include/deal.II/fe/fe_poly_face.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/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/manifold.cc
source/grid/reference_cell.cc
source/grid/tria.cc
source/multigrid/mg_tools.cc
source/numerics/data_out.cc
tests/simplex/cell_measure_01.cc

index 4036d1b4e1a4745b6fed1af1d81ad5265476a8ef..501e6eeabb59f6d542cc468468ddc02540c34ba7 100644 (file)
@@ -602,7 +602,8 @@ 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(ReferenceCell::Type::get_hypercube<dim>(),
+                              quadrature);
 }
 
 
index 3038921d24837c057a1aed9d542029975202d20b..5e3db0d40dca3c0eabfb9fef00076153ce09bc0d 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)),
+        ReferenceCell::Type::get_hypercube<dim - 1>(), quadrature)),
       output_data);
   }
 
index 3f70a9e3025f1b2fca1516157c912369a502aa43..17661eeb38a5d50c186edd15617c779117418c42 100644 (file)
@@ -177,7 +177,7 @@ namespace GridTools
   volume(const Triangulation<dim, spacedim> &tria,
          const Mapping<dim, spacedim> &      mapping =
            ReferenceCell::get_default_linear_mapping<dim, spacedim>(
-             ReferenceCell::get_hypercube<dim>()));
+             ReferenceCell::Type::get_hypercube<dim>()));
 
   /**
    * Return an approximation of the diameter of the smallest active cell of a
@@ -195,7 +195,7 @@ namespace GridTools
     const Triangulation<dim, spacedim> &triangulation,
     const Mapping<dim, spacedim> &      mapping =
       ReferenceCell::get_default_linear_mapping<dim, spacedim>(
-        ReferenceCell::get_hypercube<dim>()));
+        ReferenceCell::Type::get_hypercube<dim>()));
 
   /**
    * Return an approximation of the diameter of the largest active cell of a
@@ -213,7 +213,7 @@ namespace GridTools
     const Triangulation<dim, spacedim> &triangulation,
     const Mapping<dim, spacedim> &      mapping =
       ReferenceCell::get_default_linear_mapping<dim, spacedim>(
-        ReferenceCell::get_hypercube<dim>()));
+        ReferenceCell::Type::get_hypercube<dim>()));
 
   /**
    * Given a list of vertices (typically obtained using
@@ -1045,7 +1045,7 @@ namespace GridTools
     const Triangulation<dim, spacedim> &container,
     const Mapping<dim, spacedim> &      mapping =
       ReferenceCell::get_default_linear_mapping<dim, spacedim>(
-        ReferenceCell::get_hypercube<dim>()));
+        ReferenceCell::Type::get_hypercube<dim>()));
 
   /**
    * Find and return the index of the closest vertex to a given point in the
@@ -1873,7 +1873,7 @@ namespace GridTools
     const Point<spacedim> &                                            position,
     const Mapping<dim, spacedim> &                                     mapping =
       ReferenceCell::get_default_linear_mapping<dim, spacedim>(
-        ReferenceCell::get_hypercube<dim>()));
+        ReferenceCell::Type::get_hypercube<dim>()));
 
   /**
    * Compute a globally unique index for each vertex and hanging node
@@ -3261,7 +3261,7 @@ namespace GridTools
                 !cell->face(face)->at_boundary())
               {
                 Assert(cell->reference_cell_type() ==
-                         ReferenceCell::get_hypercube<dim>(),
+                         ReferenceCell::Type::get_hypercube<dim>(),
                        ExcNotImplemented());
 
                 // this line has children
@@ -3281,7 +3281,7 @@ namespace GridTools
                 !cell->face(face)->at_boundary())
               {
                 Assert(cell->reference_cell_type() ==
-                         ReferenceCell::get_hypercube<dim>(),
+                         ReferenceCell::Type::get_hypercube<dim>(),
                        ExcNotImplemented());
 
                 // this face has hanging nodes
index e3dd0b8b20d7b87b3c5a51e1f4e4a56915e7779d..99112c91f14eb28b9e5d198f9edd716615f03e95 100644 (file)
@@ -77,7 +77,7 @@ namespace GridTools
     Cache(const Triangulation<dim, spacedim> &tria,
           const Mapping<dim, spacedim> &      mapping =
             ReferenceCell::get_default_linear_mapping<dim, spacedim>(
-              ReferenceCell::get_hypercube<dim>()));
+              ReferenceCell::Type::get_hypercube<dim>()));
 
     /**
      * Destructor.
index 0a33f62393d25be81b6420b2767f57702f666a08..1eda918fcac5e06b07332023a9d9305205869786 100644 (file)
@@ -61,6 +61,25 @@ namespace ReferenceCell
     static const Type Hex;
     static const Type Invalid;
 
+    /**
+     * 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, Tri, or Tet.
+     */
+    template <int dim>
+    static constexpr const Type &
+    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, Quad, or Hex.
+     */
+    template <int dim>
+    static constexpr const Type &
+    get_hypercube();
+
     /**
      * Default constructor. Initialize this object as an invalid object.
      */
@@ -362,13 +381,11 @@ namespace ReferenceCell
     return "Invalid";
   }
 
-  /**
-   * Return the correct simplex reference cell type for the given dimension
-   * @p dim.
-   */
+
+
   template <int dim>
-  inline const Type &
-  get_simplex()
+  inline constexpr const Type &
+  Type::get_simplex()
   {
     switch (dim)
       {
@@ -386,13 +403,11 @@ namespace ReferenceCell
       }
   }
 
-  /**
-   * Return the correct hypercube reference cell type for the given dimension
-   * @p dim.
-   */
+
+
   template <int dim>
-  inline const Type &
-  get_hypercube()
+  inline constexpr const Type &
+  Type::get_hypercube()
   {
     switch (dim)
       {
@@ -640,7 +655,7 @@ namespace ReferenceCell
   {
     AssertDimension(dim, reference_cell.get_dimension());
 
-    if (reference_cell == get_hypercube<dim>())
+    if (reference_cell == Type::get_hypercube<dim>())
       {
         AssertIndexRange(face_no, GeometryInfo<dim>::faces_per_cell);
         return GeometryInfo<dim>::unit_normal_vector[face_no];
index 29c506c4545d7d7cc0921e4430fc2202f7b9eaa2..8fbbca7d5046ebe51ee8d7fba8ee22438559c099 100644 (file)
@@ -1756,8 +1756,8 @@ namespace internal
         Assert(index < dim, ExcInternalError());
 
         if ((reference_cell_type == ReferenceCell::Type::Invalid ||
-             reference_cell_type == ReferenceCell::get_hypercube<dim>()) ==
-            false)
+             reference_cell_type ==
+               ReferenceCell::Type::get_hypercube<dim>()) == false)
           {
 #ifdef DEAL_II_WITH_SIMPLEX_SUPPORT
             return index;
index bf45d40edbc02911892ea1444edfd5db38ba8797..14f25e4a76a66efe9e8df951cdcdf3b174ea4e1e 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_type() ==
-                ReferenceCell::get_hypercube<dim>() ?
+                ReferenceCell::Type::get_hypercube<dim>() ?
               quad :
               quad_simplex,
             dof_handlers[no]->get_fe(fe_no),
index 6b36dc12bc3c85462227f3ad495e0d52e0127c0e..c738ba254b787f6f3b11bc259ceed52d1c475ec2 100644 (file)
@@ -317,7 +317,7 @@ namespace internal
           try
             {
               const auto reference_cell_type =
-                ReferenceCell::get_simplex<dim>();
+                ReferenceCell::Type::get_simplex<dim>();
 
               const auto quad_face  = get_face_quadrature(quad);
               this->n_q_points_face = quad_face.size();
index 1c948d1b12edbc5ff8bbb278575c3b9587b7984a..3d53a53a4b7ddac853f0aed0d6552c9429705fc0 100644 (file)
@@ -281,7 +281,7 @@ namespace VectorTools
     AffineConstraints<double> &   constraints,
     const Mapping<dim, spacedim> &mapping =
       ReferenceCell::get_default_linear_mapping<dim, spacedim>(
-        ReferenceCell::get_hypercube<dim>()));
+        ReferenceCell::Type::get_hypercube<dim>()));
 
   /**
    * This function does the same as the
@@ -304,7 +304,7 @@ namespace VectorTools
     AffineConstraints<double> &         constraints,
     const Mapping<dim, spacedim> &      mapping =
       ReferenceCell::get_default_linear_mapping<dim, spacedim>(
-        ReferenceCell::get_hypercube<dim>()));
+        ReferenceCell::Type::get_hypercube<dim>()));
 
   /**
    * Compute the constraints that correspond to boundary conditions of the
@@ -333,7 +333,7 @@ namespace VectorTools
     AffineConstraints<double> &   constraints,
     const Mapping<dim, spacedim> &mapping =
       ReferenceCell::get_default_linear_mapping<dim, spacedim>(
-        ReferenceCell::get_hypercube<dim>()));
+        ReferenceCell::Type::get_hypercube<dim>()));
 
   /**
    * Same as above for homogeneous tangential-flux constraints.
@@ -352,7 +352,7 @@ namespace VectorTools
     AffineConstraints<double> &         constraints,
     const Mapping<dim, spacedim> &      mapping =
       ReferenceCell::get_default_linear_mapping<dim, spacedim>(
-        ReferenceCell::get_hypercube<dim>()));
+        ReferenceCell::Type::get_hypercube<dim>()));
 
   //@}
 } // namespace VectorTools
index 0f0c5a6ae2275bd3ab6ff44fec8d9cca13e3ed72..bd79339fba4d8f2b03995c244832c7866ac6fb5c 100644 (file)
@@ -184,7 +184,7 @@ namespace VectorTools
       Quadrature<dim> quadrature_mf;
 
       if (dof.get_fe(0).reference_cell_type() ==
-          ReferenceCell::get_hypercube<dim>())
+          ReferenceCell::Type::get_hypercube<dim>())
         quadrature_mf = QGauss<dim>(dof.get_fe().degree + 2);
       else
         // TODO: since we have currently only implemented a handful quadrature
index ca1c12d62170cff656c629e527a65013ced96c4a..a5dd84ba75490c1ba945d3d6d70026032894a8f0 100644 (file)
@@ -70,7 +70,7 @@ namespace Particles
       ParticleHandler<dim, spacedim> &    particle_handler,
       const Mapping<dim, spacedim> &      mapping =
         ReferenceCell::get_default_linear_mapping<dim, spacedim>(
-          ReferenceCell::get_hypercube<dim>()));
+          ReferenceCell::Type::get_hypercube<dim>()));
 
     /**
      * A function that generates one particle at a random location in cell @p cell and with
@@ -109,7 +109,7 @@ namespace Particles
       std::mt19937 &                random_number_generator,
       const Mapping<dim, spacedim> &mapping =
         ReferenceCell::get_default_linear_mapping<dim, spacedim>(
-          ReferenceCell::get_hypercube<dim>()));
+          ReferenceCell::Type::get_hypercube<dim>()));
 
     /**
      * A function that generates particles randomly in the domain with a
@@ -165,7 +165,7 @@ namespace Particles
       ParticleHandler<dim, spacedim> &    particle_handler,
       const Mapping<dim, spacedim> &      mapping =
         ReferenceCell::get_default_linear_mapping<dim, spacedim>(
-          ReferenceCell::get_hypercube<dim>()),
+          ReferenceCell::Type::get_hypercube<dim>()),
       const unsigned int random_number_seed = 5432);
 
 
@@ -212,7 +212,7 @@ namespace Particles
       ParticleHandler<dim, spacedim> &particle_handler,
       const Mapping<dim, spacedim> &  mapping =
         ReferenceCell::get_default_linear_mapping<dim, spacedim>(
-          ReferenceCell::get_hypercube<dim>()),
+          ReferenceCell::Type::get_hypercube<dim>()),
       const ComponentMask &                   components = ComponentMask(),
       const std::vector<std::vector<double>> &properties = {});
 
@@ -257,7 +257,7 @@ namespace Particles
       ParticleHandler<dim, spacedim> &particle_handler,
       const Mapping<dim, spacedim> &  mapping =
         ReferenceCell::get_default_linear_mapping<dim, spacedim>(
-          ReferenceCell::get_hypercube<dim>()),
+          ReferenceCell::Type::get_hypercube<dim>()),
       const std::vector<std::vector<double>> &properties = {});
   } // namespace Generators
 } // namespace Particles
index 300918747cbfb2c305af7cbfff3979d28cb6b4e9..66d97d7f2e2003bebe012f2ec7b04e4354134e04 100644 (file)
@@ -294,7 +294,7 @@ namespace DataOutBase
                                         n_data_sets,
                                       patch.data.n_rows()));
           Assert(patch.reference_cell_type !=
-                     ReferenceCell::get_hypercube<dim>() ||
+                     ReferenceCell::Type::get_hypercube<dim>() ||
                    (n_data_sets == 0) ||
                    (patch.data.n_cols() ==
                     Utilities::fixed_power<dim>(n_subdivisions + 1)),
@@ -616,7 +616,8 @@ namespace
 
     if (write_higher_order_cells)
       {
-        if (patch.reference_cell_type == ReferenceCell::get_hypercube<dim>())
+        if (patch.reference_cell_type ==
+            ReferenceCell::Type::get_hypercube<dim>())
           {
             const std::array<unsigned int, 4> cell_type_by_dim{
               {VTK_VERTEX,
@@ -667,7 +668,8 @@ namespace
         vtk_cell_id[0] = VTK_PYRAMID;
         vtk_cell_id[1] = 1;
       }
-    else if (patch.reference_cell_type == ReferenceCell::get_hypercube<dim>())
+    else if (patch.reference_cell_type ==
+             ReferenceCell::Type::get_hypercube<dim>())
       {
         const std::array<unsigned int, 4> cell_type_by_dim{
           {VTK_VERTEX, VTK_LINE, VTK_QUAD, VTK_HEXAHEDRON}};
@@ -679,7 +681,8 @@ namespace
         Assert(false, ExcNotImplemented());
       }
 
-    if (patch.reference_cell_type != ReferenceCell::get_hypercube<dim>() ||
+    if (patch.reference_cell_type !=
+          ReferenceCell::Type::get_hypercube<dim>() ||
         write_higher_order_cells)
       vtk_cell_id[2] = patch.data.n_cols();
     else
@@ -915,7 +918,8 @@ namespace
     for (const auto &patch : patches)
       {
         // The following formula doesn't hold for non-tensor products.
-        if (patch.reference_cell_type == ReferenceCell::get_hypercube<dim>())
+        if (patch.reference_cell_type ==
+            ReferenceCell::Type::get_hypercube<dim>())
           {
             n_nodes += Utilities::fixed_power<dim>(patch.n_subdivisions + 1);
             n_cells += Utilities::fixed_power<dim>(patch.n_subdivisions);
@@ -946,7 +950,8 @@ namespace
     for (const auto &patch : patches)
       {
         // The following formulas don't hold for non-tensor products.
-        if (patch.reference_cell_type == ReferenceCell::get_hypercube<dim>())
+        if (patch.reference_cell_type ==
+            ReferenceCell::Type::get_hypercube<dim>())
           {
             n_nodes += Utilities::fixed_power<dim>(patch.n_subdivisions + 1);
 
@@ -1862,7 +1867,7 @@ namespace DataOutBase
     : patch_index(no_neighbor)
     , n_subdivisions(1)
     , points_are_available(false)
-    , reference_cell_type(ReferenceCell::get_hypercube<dim>())
+    , reference_cell_type(ReferenceCell::Type::get_hypercube<dim>())
   // all the other data has a constructor of its own, except for the "neighbors"
   // field, which we set to invalid values.
   {
@@ -1964,7 +1969,7 @@ namespace DataOutBase
   Patch<0, spacedim>::Patch()
     : patch_index(no_neighbor)
     , points_are_available(false)
-    , reference_cell_type(ReferenceCell::get_hypercube<0>())
+    , reference_cell_type(ReferenceCell::Type::get_hypercube<0>())
   {
     Assert(spacedim <= 3, ExcNotImplemented());
   }
@@ -2627,7 +2632,8 @@ 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_type != ReferenceCell::get_hypercube<dim>())
+        if (patch.reference_cell_type !=
+            ReferenceCell::Type::get_hypercube<dim>())
           {
             Point<spacedim> node;
 
@@ -2671,7 +2677,8 @@ namespace DataOutBase
     for (const auto &patch : patches)
       {
         // special treatment of simplices since they are not subdivided
-        if (patch.reference_cell_type != ReferenceCell::get_hypercube<dim>())
+        if (patch.reference_cell_type !=
+            ReferenceCell::Type::get_hypercube<dim>())
           {
             out.write_cell_single(count++,
                                   first_vertex_of_patch,
@@ -8647,16 +8654,16 @@ XDMFEntry::get_xdmf_content(const unsigned int indent_level) const
     {
       case 0:
         return get_xdmf_content(indent_level,
-                                ReferenceCell::get_hypercube<0>());
+                                ReferenceCell::Type::get_hypercube<0>());
       case 1:
         return get_xdmf_content(indent_level,
-                                ReferenceCell::get_hypercube<1>());
+                                ReferenceCell::Type::get_hypercube<1>());
       case 2:
         return get_xdmf_content(indent_level,
-                                ReferenceCell::get_hypercube<2>());
+                                ReferenceCell::Type::get_hypercube<2>());
       case 3:
         return get_xdmf_content(indent_level,
-                                ReferenceCell::get_hypercube<3>());
+                                ReferenceCell::Type::get_hypercube<3>());
       default:
         Assert(false, ExcNotImplemented());
     }
index 1b0a60e397f2125cc4033c225ff833bb78219dd4..6d05bf719b43ab4006d30820385bfcf616dfeef5 100644 (file)
@@ -1159,7 +1159,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(ReferenceCell::Type::get_hypercube<dim>(),
                           quadrature,
                           child_no);
 }
@@ -1172,7 +1172,7 @@ QProjector<dim>::project_to_child(const ReferenceCell::Type reference_cell_type,
                                   const Quadrature<dim> &   quadrature,
                                   const unsigned int        child_no)
 {
-  Assert(reference_cell_type == ReferenceCell::get_hypercube<dim>(),
+  Assert(reference_cell_type == ReferenceCell::Type::get_hypercube<dim>(),
          ExcNotImplemented());
   (void)reference_cell_type;
 
@@ -1202,7 +1202,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(ReferenceCell::Type::get_hypercube<dim>(),
                                  quadrature);
 }
 
@@ -1214,7 +1214,7 @@ QProjector<dim>::project_to_all_children(
   const ReferenceCell::Type reference_cell_type,
   const Quadrature<dim> &   quadrature)
 {
-  Assert(reference_cell_type == ReferenceCell::get_hypercube<dim>(),
+  Assert(reference_cell_type == ReferenceCell::Type::get_hypercube<dim>(),
          ExcNotImplemented());
   (void)reference_cell_type;
 
@@ -1246,7 +1246,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(ReferenceCell::Type::get_hypercube<dim>(),
                          quadrature,
                          p1,
                          p2);
@@ -1261,7 +1261,7 @@ QProjector<dim>::project_to_line(const ReferenceCell::Type reference_cell_type,
                                  const Point<dim> &        p1,
                                  const Point<dim> &        p2)
 {
-  Assert(reference_cell_type == ReferenceCell::get_hypercube<dim>(),
+  Assert(reference_cell_type == ReferenceCell::Type::get_hypercube<dim>(),
          ExcNotImplemented());
   (void)reference_cell_type;
 
@@ -1290,7 +1290,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(ReferenceCell::Type::get_hypercube<dim>(),
               face_no,
               face_orientation,
               face_flip,
@@ -1323,7 +1323,7 @@ QProjector<dim>::DataSetDescriptor::face(
         }
     }
 
-  Assert(reference_cell_type == ReferenceCell::get_hypercube<dim>(),
+  Assert(reference_cell_type == ReferenceCell::Type::get_hypercube<dim>(),
          ExcNotImplemented());
 
   Assert(face_no < GeometryInfo<dim>::faces_per_cell, ExcInternalError());
@@ -1442,7 +1442,7 @@ QProjector<dim>::DataSetDescriptor::face(
         }
     }
 
-  Assert(reference_cell_type == ReferenceCell::get_hypercube<dim>(),
+  Assert(reference_cell_type == ReferenceCell::Type::get_hypercube<dim>(),
          ExcNotImplemented());
 
   Assert(face_no < GeometryInfo<dim>::faces_per_cell, ExcInternalError());
@@ -1905,7 +1905,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(ReferenceCell::Type::get_hypercube<dim>(),
                          quadrature,
                          face_no);
 }
@@ -1918,7 +1918,7 @@ QProjector<dim>::project_to_face(const ReferenceCell::Type reference_cell_type,
                                  const SubQuadrature &     quadrature,
                                  const unsigned int        face_no)
 {
-  Assert(reference_cell_type == ReferenceCell::get_hypercube<dim>(),
+  Assert(reference_cell_type == ReferenceCell::Type::get_hypercube<dim>(),
          ExcNotImplemented());
   (void)reference_cell_type;
 
@@ -1936,7 +1936,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(ReferenceCell::Type::get_hypercube<dim>(),
                             quadrature,
                             face_no,
                             subface_no,
@@ -1954,7 +1954,7 @@ QProjector<dim>::project_to_subface(
   const unsigned int             subface_no,
   const RefinementCase<dim - 1> &ref_case)
 {
-  Assert(reference_cell_type == ReferenceCell::get_hypercube<dim>(),
+  Assert(reference_cell_type == ReferenceCell::Type::get_hypercube<dim>(),
          ExcNotImplemented());
   (void)reference_cell_type;
 
index b8c57c48bfcc7776a0528871fba54d0d4952c447..53fdcf559c7e04865def7c98baf66b510b92cc05 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);
+      ReferenceCell::Type::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>(),
+                  ReferenceCell::Type::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>(),
+                  ReferenceCell::Type::get_hypercube<dim - 1>(),
                   line,
                   true,
                   false,
index 70936e79cec7d3a53b1d5cf0a9796325f0448c01..fc79ef6675d1a8e796c0e51669b9279a787fea1b 100644 (file)
@@ -51,7 +51,7 @@ FE_Nothing<dim, spacedim>::FE_Nothing(const ReferenceCell::Type &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>(ReferenceCell::Type::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_type() != ReferenceCell::get_hypercube<dim>())
+  if (this->reference_cell_type() != ReferenceCell::Type::get_hypercube<dim>())
     name_components.push_back(this->reference_cell_type().to_string());
   if (this->n_components() > 1)
     name_components.push_back(std::to_string(this->n_components()));
index 4b61a9fc0e40efe4d8d3ae35bb87d7453ca24e80..77a219bca46b33cdf37ed38d54d874f00c5cd21f 100644 (file)
@@ -263,22 +263,22 @@ struct FE_Q_Base<PolynomialType, xdim, xspacedim>::Implementation
 
         // line 5: use line 9
         QProjector<dim - 1>::project_to_subface(
-          ReferenceCell::get_hypercube<dim - 1>(), qline, 0, 0, p_line);
+          ReferenceCell::Type::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);
+          ReferenceCell::Type::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);
+          ReferenceCell::Type::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);
+          ReferenceCell::Type::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<PolynomialType, xdim, xspacedim>::Implementation
                ++subface)
             {
               QProjector<dim - 1>::project_to_subface(
-                ReferenceCell::get_hypercube<dim - 1>(),
+                ReferenceCell::Type::get_hypercube<dim - 1>(),
                 qline,
                 face,
                 subface,
index 70cfc44890f25d0cf3b0aae53c62630e8e4e8508..dbb65d925e3a8b7d817bb744171447c5c47f986e 100644 (file)
@@ -117,9 +117,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(
+      ReferenceCell::Type::get_hypercube<dim>(), quadrature[0]));
   auto &data = dynamic_cast<InternalData &>(*data_ptr);
 
   // verify that we have computed the transitive hull of the required
@@ -144,7 +143,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));
+      ReferenceCell::Type::get_hypercube<dim>(), quadrature));
   auto &data = dynamic_cast<InternalData &>(*data_ptr);
 
   // verify that we have computed the transitive hull of the required
@@ -227,7 +226,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>(),
+        ReferenceCell::Type::get_hypercube<dim>(),
         face_no,
         cell->face_orientation(face_no),
         cell->face_flip(face_no),
@@ -260,7 +259,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>(),
+        ReferenceCell::Type::get_hypercube<dim>(),
         face_no,
         sub_no,
         cell->face_orientation(face_no),
index bf64cef3058a36e46b2903e218ad87423f5692e1..0cad06d6f430a8d41331b9a9eff468ab137f4974 100644 (file)
@@ -624,9 +624,8 @@ MappingFEField<dim, spacedim, VectorType, void>::get_face_data(
   std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase> data_ptr =
     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>(),
-                                          quadrature[0]));
+  const Quadrature<dim> q(QProjector<dim>::project_to_all_faces(
+    ReferenceCell::Type::get_hypercube<dim>(), quadrature[0]));
   this->compute_face_data(update_flags, q, quadrature[0].size(), data);
 
   return data_ptr;
@@ -643,7 +642,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));
+    ReferenceCell::Type::get_hypercube<dim>(), quadrature));
   this->compute_face_data(update_flags, q, quadrature.size(), data);
 
   return data_ptr;
@@ -1701,7 +1700,7 @@ MappingFEField<dim, spacedim, VectorType, void>::fill_fe_face_values(
       face_no,
       numbers::invalid_unsigned_int,
       QProjector<dim>::DataSetDescriptor::face(
-        ReferenceCell::get_hypercube<dim>(),
+        ReferenceCell::Type::get_hypercube<dim>(),
         face_no,
         cell->face_orientation(face_no),
         cell->face_flip(face_no),
@@ -1742,7 +1741,7 @@ MappingFEField<dim, spacedim, VectorType, void>::fill_fe_subface_values(
       face_no,
       numbers::invalid_unsigned_int,
       QProjector<dim>::DataSetDescriptor::subface(
-        ReferenceCell::get_hypercube<dim>(),
+        ReferenceCell::Type::get_hypercube<dim>(),
         face_no,
         subface_no,
         cell->face_orientation(face_no),
index bc67670abb91c592f1c3a472f867c2caae2de03d..2e4926da34709825d8b8cb60eab2c2778fe91b29 100644 (file)
@@ -292,7 +292,8 @@ 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]),
+                         ReferenceCell::Type::get_hypercube<dim>(),
+                         quadrature[0]),
                        quadrature[0].size());
 
   return data_ptr;
@@ -311,7 +312,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),
+                         ReferenceCell::Type::get_hypercube<dim>(), quadrature),
                        quadrature.size());
 
   return data_ptr;
@@ -1228,7 +1229,7 @@ MappingManifold<dim, spacedim>::fill_fe_face_values(
     face_no,
     numbers::invalid_unsigned_int,
     QProjector<dim>::DataSetDescriptor::face(
-      ReferenceCell::get_hypercube<dim>(),
+      ReferenceCell::Type::get_hypercube<dim>(),
       face_no,
       cell->face_orientation(face_no),
       cell->face_flip(face_no),
@@ -1263,7 +1264,7 @@ MappingManifold<dim, spacedim>::fill_fe_subface_values(
     face_no,
     subface_no,
     QProjector<dim>::DataSetDescriptor::subface(
-      ReferenceCell::get_hypercube<dim>(),
+      ReferenceCell::Type::get_hypercube<dim>(),
       face_no,
       subface_no,
       cell->face_orientation(face_no),
index d52f46d86b86e365d2464f66d3e4321965a02675..02dd963685b11df556817542d481f6cec72de34e 100644 (file)
@@ -885,7 +885,8 @@ 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]),
+                         ReferenceCell::Type::get_hypercube<dim>(),
+                         quadrature[0]),
                        quadrature[0].size());
 
   return data_ptr;
@@ -904,7 +905,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),
+                         ReferenceCell::Type::get_hypercube<dim>(), quadrature),
                        quadrature.size());
 
   return data_ptr;
@@ -1170,7 +1171,7 @@ MappingQGeneric<dim, spacedim>::fill_fe_face_values(
     face_no,
     numbers::invalid_unsigned_int,
     QProjector<dim>::DataSetDescriptor::face(
-      ReferenceCell::get_hypercube<dim>(),
+      ReferenceCell::Type::get_hypercube<dim>(),
       face_no,
       cell->face_orientation(face_no),
       cell->face_flip(face_no),
@@ -1218,7 +1219,7 @@ MappingQGeneric<dim, spacedim>::fill_fe_subface_values(
     face_no,
     subface_no,
     QProjector<dim>::DataSetDescriptor::subface(
-      ReferenceCell::get_hypercube<dim>(),
+      ReferenceCell::Type::get_hypercube<dim>(),
       face_no,
       subface_no,
       cell->face_orientation(face_no),
index db3fe29da4b3478d620e32d0535cd44a7d95576e..7e1c46d79756974bfb18e08b37b59a5db22fcf86 100644 (file)
@@ -895,7 +895,7 @@ FlatManifold<dim, spacedim>::normal_vector(
 
   const auto face_reference_cell_type = face->reference_cell_type();
 
-  if (face_reference_cell_type == ReferenceCell::get_hypercube<facedim>())
+  if (face_reference_cell_type == ReferenceCell::Type::get_hypercube<facedim>())
     {
       for (unsigned int i = 0; i < facedim; ++i)
         xi[i] = 1. / 2;
index e0c923af1fcaaa691b2c3ab5e389a27f5425f2e0..e35fc47476fbe24024f181f258467e11b122a2c9 100644 (file)
@@ -50,7 +50,7 @@ namespace ReferenceCell
   {
     AssertDimension(dim, reference_cell.get_dimension());
 
-    if (reference_cell == get_hypercube<dim>())
+    if (reference_cell == Type::get_hypercube<dim>())
       {
         GridGenerator::hyper_cube(tria, 0, 1);
       }
@@ -123,7 +123,7 @@ namespace ReferenceCell
   {
     AssertDimension(dim, reference_cell.get_dimension());
 
-    if (reference_cell == get_hypercube<dim>())
+    if (reference_cell == Type::get_hypercube<dim>())
       return std::make_unique<MappingQGeneric<dim, spacedim>>(degree);
     else if (reference_cell == Type::Tri || reference_cell == Type::Tet)
       return std::make_unique<MappingFE<dim, spacedim>>(
@@ -149,7 +149,7 @@ namespace ReferenceCell
   {
     AssertDimension(dim, reference_cell.get_dimension());
 
-    if (reference_cell == get_hypercube<dim>())
+    if (reference_cell == Type::get_hypercube<dim>())
       {
         return StaticMappingQ1<dim, spacedim>::mapping;
       }
@@ -208,7 +208,7 @@ namespace ReferenceCell
   {
     AssertDimension(dim, reference_cell.get_dimension());
 
-    if (reference_cell == get_hypercube<dim>())
+    if (reference_cell == Type::get_hypercube<dim>())
       return QGauss<dim>(n_points_1D);
     else if (reference_cell == Type::Tri || reference_cell == Type::Tet)
       return Simplex::QGauss<dim>(n_points_1D);
@@ -222,6 +222,8 @@ namespace ReferenceCell
     return Quadrature<dim>(); // never reached
   }
 
+
+
   template <int dim>
   Quadrature<dim> &
   get_nodal_type_quadrature(const Type &reference_cell)
@@ -235,7 +237,7 @@ namespace ReferenceCell
       return Quadrature<dim>(tria.get_vertices());
     };
 
-    if (reference_cell == get_hypercube<dim>())
+    if (reference_cell == Type::get_hypercube<dim>())
       {
         static Quadrature<dim> quadrature = create_quadrature(reference_cell);
         return quadrature;
index 09bd146f76404948142da19c400208b8798d39a9..89a6c94cfbf5d9a0acb4c79466acde0d08f0c449 100644 (file)
@@ -13535,7 +13535,8 @@ Triangulation<dim, spacedim>::all_reference_cell_types_are_hyper_cube() const
 {
   return (this->reference_cell_types.size() == 0) ||
          (this->reference_cell_types.size() == 1 &&
-          this->reference_cell_types[0] == ReferenceCell::get_hypercube<dim>());
+          this->reference_cell_types[0] ==
+            ReferenceCell::Type::get_hypercube<dim>());
 }
 
 
index c52eee597e3b5c91a81d21d19bae11d3b3ba995e..d6277b47eed6786c46ed3eccd74b82e5be3c933d 100644 (file)
@@ -165,7 +165,8 @@ namespace MGTools
         // TODO: This assumes that the dofs per face on all faces coincide!
         const unsigned int face_no = 0;
 
-        Assert(fe.reference_cell_type() == ReferenceCell::get_hypercube<dim>(),
+        Assert(fe.reference_cell_type() ==
+                 ReferenceCell::Type::get_hypercube<dim>(),
                ExcNotImplemented());
 
         unsigned int increment =
@@ -345,7 +346,8 @@ namespace MGTools
 
         // TODO: This assumes that the dofs per face on all faces coincide!
         const unsigned int face_no = 0;
-        Assert(fe.reference_cell_type() == ReferenceCell::get_hypercube<dim>(),
+        Assert(fe.reference_cell_type() ==
+                 ReferenceCell::Type::get_hypercube<dim>(),
                ExcNotImplemented());
 
         Assert(couplings.n_rows() == fe.n_components(),
index 6798abcb1f46a3ffc279e9cb938aa65eca8e8fb1..cf3eb296666c99616f3391a519c24d90d8ce28f3 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_type() !=
-       ReferenceCell::get_hypercube<dim>()))
+       ReferenceCell::Type::get_hypercube<dim>()))
     {
       Assert(patch.space_dim == DoFHandlerType::space_dimension,
              ExcInternalError());
index 712ca481fefd8d45237d9153bd5940d448d0efcc..2c0157d131912eba8960768a211e2d12c44b608c 100644 (file)
@@ -47,7 +47,7 @@ process(const std::vector<Point<spacedim>> &vertices,
 
   AssertDimension(reference_cell_types.size(), 1);
 
-  if (reference_cell_types[0] == ReferenceCell::get_simplex<dim>())
+  if (reference_cell_types[0] == ReferenceCell::Type::get_simplex<dim>())
     mapping = std::make_shared<MappingFE<dim>>(Simplex::FE_P<dim>(1));
   else if (reference_cell_types[0] == ReferenceCell::Type::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.