]> https://gitweb.dealii.org/ - dealii.git/commitdiff
max_n_vertices<dim>() etc: move up to ReferenceCells.
authorDavid Wells <drwells@email.unc.edu>
Fri, 10 Jan 2025 17:34:47 +0000 (12:34 -0500)
committerDavid Wells <drwells@email.unc.edu>
Fri, 10 Jan 2025 17:35:09 +0000 (12:35 -0500)
This makes it clearer that these values do not depend on the current cell.

20 files changed:
include/deal.II/fe/mapping.h
include/deal.II/fe/mapping_fe_field.h
include/deal.II/fe/mapping_q1_eulerian.h
include/deal.II/fe/mapping_q_cache.h
include/deal.II/fe/mapping_q_eulerian.h
include/deal.II/grid/reference_cell.h
include/deal.II/grid/tria_accessor.h
include/deal.II/matrix_free/fe_evaluation_data.h
include/deal.II/matrix_free/mapping_info.templates.h
include/deal.II/matrix_free/matrix_free.h
include/deal.II/matrix_free/matrix_free.templates.h
source/fe/mapping.cc
source/fe/mapping_fe_field.cc
source/fe/mapping_q.cc
source/fe/mapping_q1_eulerian.cc
source/fe/mapping_q_cache.cc
source/fe/mapping_q_eulerian.cc
source/grid/grid_in.cc
source/grid/tria.cc
source/grid/tria_accessor.cc

index 7681b7765d55feb5c7718263d18b5522d4e693b4..2d27ec2f5bac4b4bf2e458c8e6485f79bdc0fea9 100644 (file)
@@ -350,7 +350,7 @@ public:
    */
   virtual boost::container::small_vector<Point<spacedim>,
 #ifndef _MSC_VER
-                                         ReferenceCell::max_n_vertices<dim>()
+                                         ReferenceCells::max_n_vertices<dim>()
 #else
                                          GeometryInfo<dim>::vertices_per_cell
 #endif
@@ -368,7 +368,7 @@ public:
    */
   boost::container::small_vector<Point<spacedim>,
 #ifndef _MSC_VER
-                                 ReferenceCell::max_n_vertices<dim - 1>()
+                                 ReferenceCells::max_n_vertices<dim - 1>()
 #else
                                  GeometryInfo<dim - 1>::vertices_per_cell
 #endif
index 1926de6bb7786961c223eeeddb067f7f90355fda..b1cb2f76385a88982d5420980af39b40f196069b 100644 (file)
@@ -171,7 +171,7 @@ public:
    */
   virtual boost::container::small_vector<Point<spacedim>,
 #ifndef _MSC_VER
-                                         ReferenceCell::max_n_vertices<dim>()
+                                         ReferenceCells::max_n_vertices<dim>()
 #else
                                          GeometryInfo<dim>::vertices_per_cell
 #endif
index 7810f86ee98233584576501f8214c58ab6946a4f..9275b364920f65d1cb091fcccc163c4c6c7a83be 100644 (file)
@@ -119,7 +119,7 @@ public:
    */
   virtual boost::container::small_vector<Point<spacedim>,
 #ifndef _MSC_VER
-                                         ReferenceCell::max_n_vertices<dim>()
+                                         ReferenceCells::max_n_vertices<dim>()
 #else
                                          GeometryInfo<dim>::vertices_per_cell
 #endif
index a7a6398af79a8c39384315f5c591d01f806df62f..d434a4d00e1eb8b8d455a4b856539d16a2e4e293 100644 (file)
@@ -196,7 +196,7 @@ public:
    */
   virtual boost::container::small_vector<Point<spacedim>,
 #ifndef _MSC_VER
-                                         ReferenceCell::max_n_vertices<dim>()
+                                         ReferenceCells::max_n_vertices<dim>()
 #else
                                          GeometryInfo<dim>::vertices_per_cell
 #endif
index f6355b86736f22890307290a6ed7b368f785faea..b04a5d2845804b4d042148e8a51b865e166cb425 100644 (file)
@@ -123,7 +123,7 @@ public:
    */
   virtual boost::container::small_vector<Point<spacedim>,
 #ifndef _MSC_VER
-                                         ReferenceCell::max_n_vertices<dim>()
+                                         ReferenceCells::max_n_vertices<dim>()
 #else
                                          GeometryInfo<dim>::vertices_per_cell
 #endif
index 98b363a0cf67b99c719ebbe0aa6ab5fce5b42c7b..6136bb43678173b741671b4173075b19834370cf 100644 (file)
@@ -285,17 +285,6 @@ public:
   unsigned int
   n_vertices() const;
 
-  /**
-   * Return the maximum number of vertices an object of dimension `structdim`
-   * can have. This is always the number of vertices of a
-   * `structdim`-dimensional hypercube.
-   *
-   * @see ReferenceCell::max_n_faces()
-   */
-  template <int structdim>
-  static constexpr unsigned int
-  max_n_vertices();
-
   /**
    * Return an object that can be thought of as an array containing all
    * indices from zero to n_vertices().
@@ -322,17 +311,6 @@ public:
   unsigned int
   n_lines() const;
 
-  /**
-   * Return the maximum number of lines an object of dimension `structdim` can
-   * have. This is always the number of lines of a `structdim`-dimensional
-   * hypercube.
-   *
-   * @see ReferenceCell::max_n_faces()
-   */
-  template <int structdim>
-  static constexpr unsigned int
-  max_n_lines();
-
   /**
    * Return an object that can be thought of as an array containing all
    * indices from zero to n_lines().
@@ -348,25 +326,6 @@ public:
   unsigned int
   n_faces() const;
 
-  /**
-   * Return the maximum number of faces an object of dimension `structdim` can
-   * have. This is always the number of faces of a `structdim`-dimensional
-   * hypercube.
-   *
-   * @note The primary use case of this and the other maxima functions is to
-   * enable simple array indexing to per-face data by cell index and face
-   * number, e.g.,
-   *
-   * @code
-   *     cell->index() * ReferenceCell::max_n_faces<dim>() + face_no;
-   * @endcode
-   *
-   * is a unique index to the `face_no`th face of the current cell.
-   */
-  template <int structdim>
-  static constexpr unsigned int
-  max_n_faces();
-
   /**
    * Return an object that can be thought of as an array containing all
    * indices from zero to n_faces().
@@ -1157,6 +1116,47 @@ namespace ReferenceCells
   template <int dim>
   constexpr const ReferenceCell &
   get_hypercube();
+
+  /**
+   * Return the maximum number of vertices an object of dimension `structdim`
+   * can have. This is always the number of vertices of a
+   * `structdim`-dimensional hypercube.
+   *
+   * @see ReferenceCells::max_n_faces()
+   */
+  template <int structdim>
+  constexpr unsigned int
+  max_n_vertices();
+
+  /**
+   * Return the maximum number of lines an object of dimension `structdim` can
+   * have. This is always the number of lines of a `structdim`-dimensional
+   * hypercube.
+   *
+   * @see ReferenceCells::max_n_faces()
+   */
+  template <int structdim>
+  constexpr unsigned int
+  max_n_lines();
+
+  /**
+   * Return the maximum number of faces an object of dimension `structdim` can
+   * have. This is always the number of faces of a `structdim`-dimensional
+   * hypercube.
+   *
+   * @note The primary use case of this and the other maxima functions is to
+   * enable simple array indexing to per-face data by cell index and face
+   * number, e.g.,
+   *
+   * @code
+   *     cell->index() * ReferenceCells::max_n_faces<dim>() + face_no;
+   * @endcode
+   *
+   * is a unique index to the `face_no`th face of the current cell.
+   */
+  template <int structdim>
+  constexpr unsigned int
+  max_n_faces();
 } // namespace ReferenceCells
 
 
@@ -1602,15 +1602,6 @@ ReferenceCell::n_vertices() const
 
 
 
-template <int structdim>
-inline constexpr unsigned int
-ReferenceCell::max_n_vertices()
-{
-  return GeometryInfo<structdim>::vertices_per_cell;
-}
-
-
-
 inline unsigned int
 ReferenceCell::n_lines() const
 {
@@ -1641,15 +1632,6 @@ ReferenceCell::n_lines() const
 
 
 
-template <int structdim>
-inline constexpr unsigned int
-ReferenceCell::max_n_lines()
-{
-  return GeometryInfo<structdim>::lines_per_cell;
-}
-
-
-
 template <int dim>
 Point<dim>
 ReferenceCell::vertex(const unsigned int v) const
@@ -1800,15 +1782,6 @@ ReferenceCell::n_faces() const
 
 
 
-template <int structdim>
-inline constexpr unsigned int
-ReferenceCell::max_n_faces()
-{
-  return GeometryInfo<structdim>::faces_per_cell;
-}
-
-
-
 inline std_cxx20::ranges::iota_view<unsigned int, unsigned int>
 ReferenceCell::face_indices() const
 {
@@ -2639,6 +2612,33 @@ namespace ReferenceCells
       }
     return ReferenceCells::Invalid;
   }
+
+
+
+  template <int structdim>
+  inline constexpr unsigned int
+  max_n_vertices()
+  {
+    return GeometryInfo<structdim>::vertices_per_cell;
+  }
+
+
+
+  template <int structdim>
+  inline constexpr unsigned int
+  max_n_lines()
+  {
+    return GeometryInfo<structdim>::lines_per_cell;
+  }
+
+
+
+  template <int structdim>
+  inline constexpr unsigned int
+  max_n_faces()
+  {
+    return GeometryInfo<structdim>::faces_per_cell;
+  }
 } // namespace ReferenceCells
 
 
index 6807698128a3d638d74307cecb003989b196ab23..2d542551908c38d65d6f88e0a2e693380124f6c2 100644 (file)
@@ -3241,7 +3241,7 @@ public:
   boost::container::small_vector<
     TriaIterator<TriaAccessor<dim - 1, dim, spacedim>>,
 #ifndef _MSC_VER // MSVC prior to 2022 cannot use a constexpr function this way
-    ReferenceCell::max_n_faces<dim>()
+    ReferenceCells::max_n_faces<dim>()
 #else
     GeometryInfo<dim>::faces_per_cell
 #endif
@@ -4919,7 +4919,7 @@ namespace internal
       {
         return accessor.tria->levels[accessor.present_level]
           ->cells
-          .cells[accessor.present_index * ReferenceCell::max_n_faces<3>() + i];
+          .cells[accessor.present_index * ReferenceCells::max_n_faces<3>() + i];
       }
 
 
@@ -4958,7 +4958,8 @@ namespace internal
         if (dim != 1)
           accessor.tria->levels[accessor.present_level]
             ->face_orientations.set_combined_orientation(
-              accessor.present_index * ReferenceCell::max_n_faces<dim>() + face,
+              accessor.present_index * ReferenceCells::max_n_faces<dim>() +
+                face,
               combined_orientation);
       }
 
@@ -5009,7 +5010,7 @@ namespace internal
                   cell.get_triangulation()
                     .levels[cell.level()]
                     ->face_orientations.get_combined_orientation(
-                      cell.index() * ReferenceCell::max_n_faces<dim>() + f);
+                      cell.index() * ReferenceCells::max_n_faces<dim>() + f);
 
                 // It might seem superfluous to spell out the four indices
                 // that get later consumed by a for loop over these four
@@ -5033,7 +5034,7 @@ namespace internal
                   cell.get_triangulation()
                     .levels[cell.level()]
                     ->face_orientations.get_combined_orientation(
-                      cell.index() * ReferenceCell::max_n_faces<dim>() + f);
+                      cell.index() * ReferenceCells::max_n_faces<dim>() + f);
                 const std::array<unsigned int, 2> my_indices{
                   {ref_cell.standard_to_real_face_line(0, f, orientation),
                    ref_cell.standard_to_real_face_line(1, f, orientation)}};
@@ -5130,7 +5131,7 @@ namespace internal
                   cell.get_triangulation()
                     .levels[cell.level()]
                     ->face_orientations.get_combined_orientation(
-                      cell.index() * ReferenceCell::max_n_faces<dim>() + f);
+                      cell.index() * ReferenceCells::max_n_faces<dim>() + f);
 
                 // It might seem superfluous to spell out the four indices and
                 // orientations that get later consumed by a for loop over
@@ -5165,7 +5166,7 @@ namespace internal
                   cell.get_triangulation()
                     .levels[cell.level()]
                     ->face_orientations.get_combined_orientation(
-                      cell.index() * ReferenceCell::max_n_faces<3>() + f);
+                      cell.index() * ReferenceCells::max_n_faces<3>() + f);
                 const std::array<unsigned int, 2> my_indices{
                   {ref_cell.standard_to_real_face_line(0, f, orientation),
                    ref_cell.standard_to_real_face_line(1, f, orientation)}};
@@ -5305,14 +5306,14 @@ TriaAccessor<structdim, dim, spacedim>::vertex_index(
       // dim branch) so that we can get line vertex indices when setting up the
       // cell vertex index cache
       return this->objects()
-        .cells[this->present_index * ReferenceCell::max_n_faces<1>() + corner];
+        .cells[this->present_index * ReferenceCells::max_n_faces<1>() + corner];
     }
   else if constexpr (structdim == dim)
     {
       // This branch should only be used after the cell vertex index cache is
       // set up
       const auto my_index = static_cast<std::size_t>(this->present_index) *
-                            ReferenceCell::max_n_vertices<dim>();
+                            ReferenceCells::max_n_vertices<dim>();
       AssertIndexRange(my_index + corner,
                        this->tria->levels[this->present_level]
                          ->cell_vertex_indices_cache.size());
@@ -5380,7 +5381,7 @@ TriaAccessor<structdim, dim, spacedim>::line_index(const unsigned int i) const
   if constexpr (structdim == 2)
     {
       return this->objects()
-        .cells[this->present_index * ReferenceCell::max_n_faces<2>() + i];
+        .cells[this->present_index * ReferenceCells::max_n_faces<2>() + i];
     }
   else if constexpr (structdim == 3)
     {
@@ -5447,12 +5448,12 @@ TriaAccessor<structdim, dim, spacedim>::combined_face_orientation(
       else
         return this->tria->levels[this->present_level]
           ->face_orientations.get_orientation(
-            this->present_index * ReferenceCell::max_n_faces<dim>() + face);
+            this->present_index * ReferenceCells::max_n_faces<dim>() + face);
     }
   else
     return this->tria->levels[this->present_level]
       ->face_orientations.get_combined_orientation(
-        this->present_index * ReferenceCell::max_n_faces<dim>() + face);
+        this->present_index * ReferenceCells::max_n_faces<dim>() + face);
 }
 
 
@@ -5479,7 +5480,7 @@ TriaAccessor<structdim, dim, spacedim>::face_orientation(
   else
     return this->tria->levels[this->present_level]
       ->face_orientations.get_orientation(
-        this->present_index * ReferenceCell::max_n_faces<structdim>() + face);
+        this->present_index * ReferenceCells::max_n_faces<structdim>() + face);
 }
 
 
@@ -5499,7 +5500,7 @@ TriaAccessor<structdim, dim, spacedim>::face_flip(const unsigned int face) const
 
   if constexpr (structdim == 3)
     return this->tria->levels[this->present_level]->face_orientations.get_flip(
-      this->present_index * ReferenceCell::max_n_faces<structdim>() + face);
+      this->present_index * ReferenceCells::max_n_faces<structdim>() + face);
   else
     // In 1d and 2d, face_flip is always false as faces can only be
     // 'flipped' in 3d.
@@ -5524,7 +5525,7 @@ TriaAccessor<structdim, dim, spacedim>::face_rotation(
   if constexpr (structdim == 3)
     return this->tria->levels[this->present_level]
       ->face_orientations.get_rotation(
-        this->present_index * ReferenceCell::max_n_faces<structdim>() + face);
+        this->present_index * ReferenceCells::max_n_faces<structdim>() + face);
   else
     // In 1d and 2d, face_rotation is always false as faces can only be
     // 'rotated' in 3d.
@@ -5562,11 +5563,11 @@ TriaAccessor<structdim, dim, spacedim>::line_orientation(
   else if constexpr (structdim == 2 && dim == 3)
     {
       // line orientations in 3d are stored in their own array
-      Assert(this->present_index * ReferenceCell::max_n_lines<2>() + line <
+      Assert(this->present_index * ReferenceCells::max_n_lines<2>() + line <
                this->tria->faces->quads_line_orientations.size(),
              ExcInternalError());
       return this->tria->faces->quads_line_orientations
-        [this->present_index * ReferenceCell::max_n_lines<2>() + line];
+        [this->present_index * ReferenceCells::max_n_lines<2>() + line];
     }
   else if constexpr (structdim == 3 && dim == 3)
     {
@@ -5620,11 +5621,11 @@ TriaAccessor<structdim, dim, spacedim>::set_line_orientation(
       // We set line orientations per face, not per cell, so this only works for
       // faces in 3d
       Assert(structdim == 2, ExcNotImplemented());
-      Assert(this->present_index * ReferenceCell::max_n_lines<2>() + line <
+      Assert(this->present_index * ReferenceCells::max_n_lines<2>() + line <
                this->tria->faces->quads_line_orientations.size(),
              ExcInternalError());
       this->tria->faces->quads_line_orientations
-        [this->present_index * ReferenceCell::max_n_lines<2>() + line] = value;
+        [this->present_index * ReferenceCells::max_n_lines<2>() + line] = value;
     }
 }
 
@@ -6347,7 +6348,7 @@ TriaAccessor<structdim, dim, spacedim>::diameter() const
 {
   boost::container::small_vector<Point<spacedim>,
 #  ifndef _MSC_VER
-                                 ReferenceCell::max_n_vertices<structdim>()
+                                 ReferenceCells::max_n_vertices<structdim>()
 #  else
                                  GeometryInfo<structdim>::vertices_per_cell
 #  endif
@@ -7666,7 +7667,7 @@ template <int dim, int spacedim>
 inline boost::container::small_vector<
   TriaIterator<TriaAccessor<dim - 1, dim, spacedim>>,
 #  ifndef _MSC_VER
-  ReferenceCell::max_n_faces<dim>()
+  ReferenceCells::max_n_faces<dim>()
 #  else
   GeometryInfo<dim>::faces_per_cell
 #  endif
@@ -7676,7 +7677,7 @@ CellAccessor<dim, spacedim>::face_iterators() const
   boost::container::small_vector<
     TriaIterator<TriaAccessor<dim - 1, dim, spacedim>>,
 #  ifndef _MSC_VER
-    ReferenceCell::max_n_faces<dim>()
+    ReferenceCells::max_n_faces<dim>()
 #  else
     GeometryInfo<dim>::faces_per_cell
 #  endif
@@ -7719,7 +7720,7 @@ CellAccessor<dim, spacedim>::neighbor_index(const unsigned int face_no) const
 {
   AssertIndexRange(face_no, this->n_faces());
   return this->tria->levels[this->present_level]
-    ->neighbors[this->present_index * ReferenceCell::max_n_faces<dim>() +
+    ->neighbors[this->present_index * ReferenceCells::max_n_faces<dim>() +
                 face_no]
     .second;
 }
@@ -7732,7 +7733,7 @@ CellAccessor<dim, spacedim>::neighbor_level(const unsigned int face_no) const
 {
   AssertIndexRange(face_no, this->n_faces());
   return this->tria->levels[this->present_level]
-    ->neighbors[this->present_index * ReferenceCell::max_n_faces<dim>() +
+    ->neighbors[this->present_index * ReferenceCells::max_n_faces<dim>() +
                 face_no]
     .first;
 }
index f4e3d2d8063a509eb38f25162a5a65874647f5aa..edad29b521e51980ee5e1260c53724f14e5164dc 100644 (file)
@@ -1544,7 +1544,7 @@ FEEvaluationData<dim, Number, is_face>::get_current_cell_index() const
 {
   if (is_face && dof_access_index ==
                    internal::MatrixFreeFunctions::DoFInfo::dof_access_cell)
-    return cell * ReferenceCell::max_n_faces<dim>() + face_numbers[0];
+    return cell * ReferenceCells::max_n_faces<dim>() + face_numbers[0];
   else
     return cell;
 }
index 9b3c04d3b645974f24a893f8851bd4164eb73594..578dce85c860370ffa95f6a6c58b4d8e78c1021e 100644 (file)
@@ -3099,10 +3099,10 @@ namespace internal
           // counting
           AssertDimension(cell_type.size(), cells.size() / n_lanes);
           face_data_by_cells[my_q].data_index_offsets.resize(
-            cell_type.size() * ReferenceCell::max_n_faces<dim>());
+            cell_type.size() * ReferenceCells::max_n_faces<dim>());
           if (update_flags & update_quadrature_points)
             face_data_by_cells[my_q].quadrature_point_offsets.resize(
-              cell_type.size() * ReferenceCell::max_n_faces<dim>());
+              cell_type.size() * ReferenceCells::max_n_faces<dim>());
           std::size_t storage_length = 0;
           for (unsigned int i = 0; i < cell_type.size(); ++i)
             for (const unsigned int face : GeometryInfo<dim>::face_indices())
@@ -3110,54 +3110,54 @@ namespace internal
                 if (faces_by_cells_type[i][face] <= affine)
                   {
                     face_data_by_cells[my_q].data_index_offsets
-                      [i * ReferenceCell::max_n_faces<dim>() + face] =
+                      [i * ReferenceCells::max_n_faces<dim>() + face] =
                       storage_length;
                     ++storage_length;
                   }
                 else
                   {
                     face_data_by_cells[my_q].data_index_offsets
-                      [i * ReferenceCell::max_n_faces<dim>() + face] =
+                      [i * ReferenceCells::max_n_faces<dim>() + face] =
                       storage_length;
                     storage_length +=
                       face_data_by_cells[my_q].descriptor[0].n_q_points;
                   }
                 if (update_flags & update_quadrature_points)
                   face_data_by_cells[my_q].quadrature_point_offsets
-                    [i * ReferenceCell::max_n_faces<dim>() + face] =
-                    (i * ReferenceCell::max_n_faces<dim>() + face) *
+                    [i * ReferenceCells::max_n_faces<dim>() + face] =
+                    (i * ReferenceCells::max_n_faces<dim>() + face) *
                     face_data_by_cells[my_q].descriptor[0].n_q_points;
               }
           face_data_by_cells[my_q].JxW_values.resize_fast(
-            storage_length * ReferenceCell::max_n_faces<dim>());
+            storage_length * ReferenceCells::max_n_faces<dim>());
           face_data_by_cells[my_q].jacobians[0].resize_fast(
-            storage_length * ReferenceCell::max_n_faces<dim>());
+            storage_length * ReferenceCells::max_n_faces<dim>());
           face_data_by_cells[my_q].jacobians[1].resize_fast(
-            storage_length * ReferenceCell::max_n_faces<dim>());
+            storage_length * ReferenceCells::max_n_faces<dim>());
           if (update_flags & update_normal_vectors)
             face_data_by_cells[my_q].normal_vectors.resize_fast(
-              storage_length * ReferenceCell::max_n_faces<dim>());
+              storage_length * ReferenceCells::max_n_faces<dim>());
           if (update_flags & update_normal_vectors &&
               update_flags & update_jacobians)
             face_data_by_cells[my_q].normals_times_jacobians[0].resize_fast(
-              storage_length * ReferenceCell::max_n_faces<dim>());
+              storage_length * ReferenceCells::max_n_faces<dim>());
           if (update_flags & update_normal_vectors &&
               update_flags & update_jacobians)
             face_data_by_cells[my_q].normals_times_jacobians[1].resize_fast(
-              storage_length * ReferenceCell::max_n_faces<dim>());
+              storage_length * ReferenceCells::max_n_faces<dim>());
           if (update_flags & update_jacobian_grads)
             {
               face_data_by_cells[my_q].jacobian_gradients[0].resize_fast(
-                storage_length * ReferenceCell::max_n_faces<dim>());
+                storage_length * ReferenceCells::max_n_faces<dim>());
               face_data_by_cells[my_q]
                 .jacobian_gradients_non_inverse[0]
                 .resize_fast(storage_length *
-                             ReferenceCell::max_n_faces<dim>());
+                             ReferenceCells::max_n_faces<dim>());
             }
 
           if (update_flags & update_quadrature_points)
             face_data_by_cells[my_q].quadrature_points.resize_fast(
-              cell_type.size() * ReferenceCell::max_n_faces<dim>() *
+              cell_type.size() * ReferenceCells::max_n_faces<dim>() *
               face_data_by_cells[my_q].descriptor[0].n_q_points);
         }
 
@@ -3195,9 +3195,8 @@ namespace internal
               dealii::FEFaceValues<dim> &fe_val_neigh =
                 *fe_face_values_neigh[my_q][fe_index];
               const unsigned int offset =
-                face_data_by_cells[my_q]
-                  .data_index_offsets[cell * ReferenceCell::max_n_faces<dim>() +
-                                      face];
+                face_data_by_cells[my_q].data_index_offsets
+                  [cell * ReferenceCells::max_n_faces<dim>() + face];
 
               const GeometryType my_cell_type = faces_by_cells_type[cell][face];
 
@@ -3334,7 +3333,8 @@ namespace internal
                       for (unsigned int d = 0; d < dim; ++d)
                         face_data_by_cells[my_q].quadrature_points
                           [face_data_by_cells[my_q].quadrature_point_offsets
-                             [cell * ReferenceCell::max_n_faces<dim>() + face] +
+                             [cell * ReferenceCells::max_n_faces<dim>() +
+                              face] +
                            q][d][v] = fe_val.quadrature_point(q)[d];
                 }
               if (update_flags & update_normal_vectors &&
@@ -3372,7 +3372,7 @@ namespace internal
       memory += cell_type.capacity() * sizeof(GeometryType);
       memory += face_type.capacity() * sizeof(GeometryType);
       memory += faces_by_cells_type.capacity() *
-                ReferenceCell::max_n_faces<dim>() * sizeof(GeometryType);
+                ReferenceCells::max_n_faces<dim>() * sizeof(GeometryType);
       memory += sizeof(*this);
       return memory;
     }
@@ -3398,7 +3398,7 @@ namespace internal
       out << "    Faces by cells types:            ";
       task_info.print_memory_statistics(out,
                                         faces_by_cells_type.capacity() *
-                                          ReferenceCell::max_n_faces<dim>() *
+                                          ReferenceCells::max_n_faces<dim>() *
                                           sizeof(GeometryType));
 
       for (unsigned int j = 0; j < cell_data.size(); ++j)
index 4eecd5539a14f71efe924ebdaa66e4288a87f2cb..7244e41a37473a003933b5e6cb5986716cf80554 100644 (file)
@@ -2571,7 +2571,7 @@ MatrixFree<dim, Number, VectorizedArrayType>::get_faces_by_cells_boundary_id(
   const unsigned int face_number) const
 {
   AssertIndexRange(cell_batch_index, n_cell_batches());
-  AssertIndexRange(face_number, ReferenceCell::max_n_faces<dim>());
+  AssertIndexRange(face_number, ReferenceCells::max_n_faces<dim>());
   Assert(face_info.cell_and_face_boundary_id.size(0) >= n_cell_batches(),
          ExcNotInitialized());
   std::array<types::boundary_id, VectorizedArrayType::size()> result;
index 23affe7c9028a6a6ed3dec4bd0b3b1a9f4c19c58..fd2db2c568c25c90e01acb3d55bc93b763942b9e 100644 (file)
@@ -2062,7 +2062,7 @@ MatrixFree<dim, Number, VectorizedArrayType>::initialize_indices(
         numbers::invalid_unsigned_int);
       face_info.cell_and_face_boundary_id.reinit(
         TableIndices<3>(task_info.cell_partition_data.back(),
-                        ReferenceCell::max_n_faces<dim>(),
+                        ReferenceCells::max_n_faces<dim>(),
                         VectorizedArrayType::size()),
         true);
       face_info.cell_and_face_boundary_id.fill(numbers::invalid_boundary_id);
index a6386f89d456fb192c862c1dd4fb7e557b42d139..5bf7e72eb1fcdbc8754ef0d5ff53d118f76783ab 100644 (file)
@@ -35,7 +35,7 @@ DEAL_II_NAMESPACE_OPEN
 template <int dim, int spacedim>
 boost::container::small_vector<Point<spacedim>,
 #  ifndef _MSC_VER
-                               ReferenceCell::max_n_vertices<dim>()
+                               ReferenceCells::max_n_vertices<dim>()
 #  else
                                GeometryInfo<dim>::vertices_per_cell
 #  endif
@@ -45,7 +45,7 @@ Mapping<dim, spacedim>::get_vertices(
 {
   boost::container::small_vector<Point<spacedim>,
 #  ifndef _MSC_VER
-                                 ReferenceCell::max_n_vertices<dim>()
+                                 ReferenceCells::max_n_vertices<dim>()
 #  else
                                  GeometryInfo<dim>::vertices_per_cell
 #  endif
@@ -62,7 +62,7 @@ Mapping<dim, spacedim>::get_vertices(
 template <int dim, int spacedim>
 boost::container::small_vector<Point<spacedim>,
 #  ifndef _MSC_VER
-                               ReferenceCell::max_n_vertices<dim - 1>()
+                               ReferenceCells::max_n_vertices<dim - 1>()
 #  else
                                GeometryInfo<dim - 1>::vertices_per_cell
 #  endif
@@ -73,7 +73,7 @@ Mapping<dim, spacedim>::get_vertices(
 {
   boost::container::small_vector<Point<spacedim>,
 #  ifndef _MSC_VER
-                                 ReferenceCell::max_n_vertices<dim - 1>()
+                                 ReferenceCells::max_n_vertices<dim - 1>()
 #  else
                                  GeometryInfo<dim - 1>::vertices_per_cell
 #  endif
index 58d9f8f0cbac6af8bfa1e1bdd8fe7385e5e7e529..b13539d37e1a3a0c4c49ce1f72fa01f30d4f4d26 100644 (file)
@@ -448,7 +448,7 @@ MappingFEField<dim, spacedim, VectorType>::is_compatible_with(
 template <int dim, int spacedim, typename VectorType>
 boost::container::small_vector<Point<spacedim>,
 #ifndef _MSC_VER
-                               ReferenceCell::max_n_vertices<dim>()
+                               ReferenceCells::max_n_vertices<dim>()
 #else
                                GeometryInfo<dim>::vertices_per_cell
 #endif
@@ -491,7 +491,7 @@ MappingFEField<dim, spacedim, VectorType>::get_vertices(
 
   boost::container::small_vector<Point<spacedim>,
 #ifndef _MSC_VER
-                                 ReferenceCell::max_n_vertices<dim>()
+                                 ReferenceCells::max_n_vertices<dim>()
 #else
                                  GeometryInfo<dim>::vertices_per_cell
 #endif
index 55c2fe6aee9df29bf9041740f95a5a89ca6896a1..e838b338ddac2f98c2ee57cc40c7d0a9b5033def 100644 (file)
@@ -643,7 +643,7 @@ MappingQ<dim, spacedim>::transform_points_real_to_unit_cell(
   std::vector<Point<spacedim>> support_points_higher_order;
   boost::container::small_vector<Point<spacedim>,
 #ifndef _MSC_VER
-                                 ReferenceCell::max_n_vertices<dim>()
+                                 ReferenceCells::max_n_vertices<dim>()
 #else
                                  GeometryInfo<dim>::vertices_per_cell
 #endif
index 79358a1ccb9479efa1dc9ac8da62687e5cd9f205..a8a2076b1c67f67abd40ee8b2539fc0e70b2508f 100644 (file)
@@ -50,7 +50,7 @@ MappingQ1Eulerian<dim, VectorType, spacedim>::MappingQ1Eulerian(
 template <int dim, typename VectorType, int spacedim>
 boost::container::small_vector<Point<spacedim>,
 #ifndef _MSC_VER
-                               ReferenceCell::max_n_vertices<dim>()
+                               ReferenceCells::max_n_vertices<dim>()
 #else
                                GeometryInfo<dim>::vertices_per_cell
 #endif
@@ -60,7 +60,7 @@ MappingQ1Eulerian<dim, VectorType, spacedim>::get_vertices(
 {
   boost::container::small_vector<Point<spacedim>,
 #ifndef _MSC_VER
-                                 ReferenceCell::max_n_vertices<dim>()
+                                 ReferenceCells::max_n_vertices<dim>()
 #else
                                  GeometryInfo<dim>::vertices_per_cell
 #endif
index 52f0bca873d8acd485dd16d314e9306004404e18..353a483963becedb502a5d128fbf9ad7955ed466 100644 (file)
@@ -729,7 +729,7 @@ MappingQCache<dim, spacedim>::compute_mapping_support_points(
 template <int dim, int spacedim>
 boost::container::small_vector<Point<spacedim>,
 #ifndef _MSC_VER
-                               ReferenceCell::max_n_vertices<dim>()
+                               ReferenceCells::max_n_vertices<dim>()
 #else
                                GeometryInfo<dim>::vertices_per_cell
 #endif
@@ -748,7 +748,7 @@ MappingQCache<dim, spacedim>::get_vertices(
   const auto ptr = (*support_point_cache)[cell->level()][cell->index()].begin();
   return boost::container::small_vector<Point<spacedim>,
 #ifndef _MSC_VER
-                                        ReferenceCell::max_n_vertices<dim>()
+                                        ReferenceCells::max_n_vertices<dim>()
 #else
                                         GeometryInfo<dim>::vertices_per_cell
 #endif
index 3569730fd151febd0081a3b2930b6068a58be8f1..9f8bec794cf9986672162c203fc98f3c1ec41aea 100644 (file)
@@ -100,7 +100,7 @@ MappingQEulerian<dim, VectorType, spacedim>::SupportQuadrature::
 template <int dim, typename VectorType, int spacedim>
 boost::container::small_vector<Point<spacedim>,
 #ifndef _MSC_VER
-                               ReferenceCell::max_n_vertices<dim>()
+                               ReferenceCells::max_n_vertices<dim>()
 #else
                                GeometryInfo<dim>::vertices_per_cell
 #endif
@@ -113,7 +113,7 @@ MappingQEulerian<dim, VectorType, spacedim>::get_vertices(
 
   boost::container::small_vector<Point<spacedim>,
 #ifndef _MSC_VER
-                                 ReferenceCell::max_n_vertices<dim>()
+                                 ReferenceCells::max_n_vertices<dim>()
 #else
                                  GeometryInfo<dim>::vertices_per_cell
 #endif
index 909902b64ea0823f50ddd1ef87c45eaa03c92294..0d14a63839b3f76d6e40568661f9a63057b3e6cf 100644 (file)
@@ -3771,7 +3771,7 @@ namespace
                     const long        element_n = elements[side_n] - 1;
                     const long        face_n    = faces[side_n] - 1;
                     const std::size_t face_id =
-                      element_n * ReferenceCell::max_n_faces<dim>() + face_n;
+                      element_n * ReferenceCells::max_n_faces<dim>() + face_n;
                     face_side_sets[face_id].push_back(side_set_id);
                   }
               }
@@ -3818,9 +3818,9 @@ namespace
               }
             // Record the b_or_m_id of the current face.
             const unsigned int local_face_n =
-              face_id % ReferenceCell::max_n_faces<dim>();
+              face_id % ReferenceCells::max_n_faces<dim>();
             const CellData<dim> &cell =
-              cells[face_id / ReferenceCell::max_n_faces<dim>()];
+              cells[face_id / ReferenceCells::max_n_faces<dim>()];
             const ReferenceCell cell_type =
               ReferenceCell::n_vertices_to_type(dim, cell.vertices.size());
             const unsigned int deal_face_n =
index 109da0ad42032bc7573a430ef1d7f5713a5a4995..79daa46b30e04ae4fd27f90c5d0c324e50e90ef4 100644 (file)
@@ -1837,13 +1837,13 @@ namespace
     switch (structdim)
       {
         case 0:
-          return ReferenceCell::max_n_faces<0>();
+          return ReferenceCells::max_n_faces<0>();
         case 1:
-          return ReferenceCell::max_n_faces<1>();
+          return ReferenceCells::max_n_faces<1>();
         case 2:
-          return ReferenceCell::max_n_faces<2>();
+          return ReferenceCells::max_n_faces<2>();
         case 3:
-          return ReferenceCell::max_n_faces<3>();
+          return ReferenceCells::max_n_faces<3>();
         default:
           DEAL_II_ASSERT_UNREACHABLE();
           return numbers::invalid_unsigned_int;
@@ -2070,7 +2070,7 @@ namespace internal
         {
           // reserve the field of the derived class
           tria_faces.quads_line_orientations.resize(
-            new_size * ReferenceCell::max_n_lines<2>(), true);
+            new_size * ReferenceCells::max_n_lines<2>(), true);
 
           auto &q_is_q = tria_faces.quad_is_quadrilateral;
           q_is_q.reserve(new_size);
@@ -3267,7 +3267,7 @@ namespace internal
             for (unsigned int line = 0; line < n_lines; ++line)
               for (unsigned int i = crs.ptr[line], j = 0; i < crs.ptr[line + 1];
                    ++i, ++j)
-                lines_0.cells[line * ReferenceCell::max_n_faces<1>() + j] =
+                lines_0.cells[line * ReferenceCells::max_n_faces<1>() + j] =
                   crs.col[i]; // set vertex indices
           }
 
@@ -3298,7 +3298,7 @@ namespace internal
                   {
                     AssertIndexRange(j, reference_cell.n_lines());
                     // set line index
-                    quads_0.cells[q * ReferenceCell::max_n_lines<2>() + j] =
+                    quads_0.cells[q * ReferenceCells::max_n_lines<2>() + j] =
                       crs.col[i];
 
                     // set line orientations
@@ -3314,7 +3314,7 @@ namespace internal
                           ReferenceCell::reversed_combined_line_orientation(),
                       ExcInternalError());
                     faces.quads_line_orientations
-                      [q * ReferenceCell::max_n_lines<2>() + j] =
+                      [q * ReferenceCells::max_n_lines<2>() + j] =
                       combined_orientation ==
                       ReferenceCell::default_combined_face_orientation();
                   }
@@ -3370,18 +3370,18 @@ namespace internal
                 {
                   // set neighbor if not at boundary
                   if (nei.col[i] != static_cast<unsigned int>(-1))
-                    level.neighbors[cell * ReferenceCell::max_n_faces<dim>() +
+                    level.neighbors[cell * ReferenceCells::max_n_faces<dim>() +
                                     j] = {0, nei.col[i]};
 
                   // set face indices
-                  cells_0.cells[cell * ReferenceCell::max_n_faces<dim>() + j] =
+                  cells_0.cells[cell * ReferenceCells::max_n_faces<dim>() + j] =
                     crs.col[i];
 
                   // set face orientation if needed
                   if (orientation_needed)
                     {
                       level.face_orientations.set_combined_orientation(
-                        cell * ReferenceCell::max_n_faces<dim>() + j,
+                        cell * ReferenceCells::max_n_faces<dim>() + j,
                         connectivity.entity_orientations(dim - 1)
                           .get_combined_orientation(i));
                     }
@@ -3498,7 +3498,7 @@ namespace internal
         [[maybe_unused]] unsigned int counter = 0;
 
         std::vector<unsigned int> key;
-        key.reserve(ReferenceCell::max_n_vertices<structdim>());
+        key.reserve(ReferenceCells::max_n_vertices<structdim>());
 
         for (unsigned int o = 0; o < obj.n_objects(); ++o)
           {
@@ -15956,12 +15956,12 @@ void Triangulation<dim, spacedim>::reset_cell_vertex_indices_cache()
       std::vector<unsigned int> &cache = levels[l]->cell_vertex_indices_cache;
       cache.clear();
       cache.resize(levels[l]->refine_flags.size() *
-                     ReferenceCell::max_n_vertices<dim>(),
+                     ReferenceCells::max_n_vertices<dim>(),
                    numbers::invalid_unsigned_int);
       for (const auto &cell : cell_iterators_on_level(l))
         {
           const unsigned int my_index =
-            cell->index() * ReferenceCell::max_n_vertices<dim>();
+            cell->index() * ReferenceCells::max_n_vertices<dim>();
 
           // to reduce the cost of this function when passing down into quads,
           // then lines, then vertices, we use a more low-level access method
@@ -15982,7 +15982,7 @@ void Triangulation<dim, spacedim>::reset_cell_vertex_indices_cache()
 
                 const unsigned char combined_orientation =
                   levels[l]->face_orientations.get_combined_orientation(
-                    cell->index() * ReferenceCell::max_n_faces<dim>() + face);
+                    cell->index() * ReferenceCells::max_n_faces<dim>() + face);
                 std::array<unsigned int, 4> vertex_order{
                   {ref_cell.standard_to_real_face_vertex(0,
                                                          face,
index 704ae97b0453d1362f49c6fbcefff79c47cc2e9b..6353eebf126d97680d5ccb5fa8ada3ca19394371 100644 (file)
@@ -2360,19 +2360,23 @@ CellAccessor<dim, spacedim>::set_neighbor(
   if (pointer.state() == IteratorState::valid)
     {
       this->tria->levels[this->present_level]
-        ->neighbors[this->present_index * ReferenceCell::max_n_faces<dim>() + i]
+        ->neighbors[this->present_index * ReferenceCells::max_n_faces<dim>() +
+                    i]
         .first = pointer->present_level;
       this->tria->levels[this->present_level]
-        ->neighbors[this->present_index * ReferenceCell::max_n_faces<dim>() + i]
+        ->neighbors[this->present_index * ReferenceCells::max_n_faces<dim>() +
+                    i]
         .second = pointer->present_index;
     }
   else
     {
       this->tria->levels[this->present_level]
-        ->neighbors[this->present_index * ReferenceCell::max_n_faces<dim>() + i]
+        ->neighbors[this->present_index * ReferenceCells::max_n_faces<dim>() +
+                    i]
         .first = -1;
       this->tria->levels[this->present_level]
-        ->neighbors[this->present_index * ReferenceCell::max_n_faces<dim>() + i]
+        ->neighbors[this->present_index * ReferenceCells::max_n_faces<dim>() +
+                    i]
         .second = -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.