]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Standardize on 'const X' instead of 'X const'. 15908/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 22 Aug 2023 02:43:03 +0000 (20:43 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 22 Aug 2023 02:43:03 +0000 (20:43 -0600)
39 files changed:
include/deal.II/base/cuda.h
include/deal.II/base/partitioner.templates.h
include/deal.II/base/template_constraints.h
include/deal.II/fe/fe_tools.templates.h
include/deal.II/lac/block_vector_base.h
include/deal.II/lac/petsc_matrix_base.h
include/deal.II/lac/precondition.h
include/deal.II/lac/scalapack.templates.h
include/deal.II/lac/solver_cg.h
include/deal.II/lac/sparse_matrix_tools.h
include/deal.II/matrix_free/type_traits.h
include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h
include/deal.II/numerics/matrix_creator.templates.h
include/deal.II/numerics/rtree.h
include/deal.II/numerics/vector_tools_boundary.templates.h
source/base/polynomial.cc
source/distributed/field_transfer.cc
source/distributed/p4est_wrappers.cc
source/dofs/dof_accessor_set.cc
source/grid/grid_generator.cc
source/grid/grid_tools.cc
source/numerics/derivative_approximation.cc
source/particles/generators.cc
tests/base/graph_coloring_01.cc
tests/base/graph_coloring_02.cc
tests/base/graph_coloring_02a.cc
tests/base/graph_coloring_03.cc
tests/base/graph_coloring_05.cc
tests/base/graph_coloring_06.cc
tests/base/mpi_some_to_some_01.cc
tests/mappings/mapping_get_vertices_on_face.cc
tests/matrix_free/matrix_vector_rt_04.cc
tests/matrix_free/matrix_vector_rt_face_04.cc
tests/numerics/assemble_matrix_parallel_01.cc
tests/numerics/assemble_matrix_parallel_02.cc
tests/numerics/assemble_matrix_parallel_03.cc
tests/numerics/assemble_matrix_parallel_04.cc
tests/petsc/assemble_matrix_parallel_01.cc
tests/trilinos/assemble_matrix_parallel_01.cc

index 07baabae9839d655920d2c937dc019cf76ffaaf5..b85646807fe9e1c22d28ca959268cf0c104f3957 100644 (file)
@@ -51,7 +51,7 @@ namespace Utilities
       /**
        * Copy constructor is deleted.
        */
-      Handle(Handle const &) = delete;
+      Handle(const Handle &) = delete;
 
       /**
        * Destructor. Destroy the handles.
index 978a6c408974e8f2ca8330afdc6d581e8f8c3629..38db3728beefa549e3cea2c32b28f1382a418afb 100644 (file)
@@ -599,7 +599,7 @@ namespace Utilities
             {
               if (vector_operation == VectorOperation::add)
                 {
-                  for (auto const &import_indices_plain :
+                  for (const auto &import_indices_plain :
                        import_indices_plain_dev)
                     {
                       const auto chunk_size = import_indices_plain.size();
@@ -623,7 +623,7 @@ namespace Utilities
                 }
               else if (vector_operation == VectorOperation::min)
                 {
-                  for (auto const &import_indices_plain :
+                  for (const auto &import_indices_plain :
                        import_indices_plain_dev)
                     {
                       const auto chunk_size = import_indices_plain.size();
@@ -650,7 +650,7 @@ namespace Utilities
                 }
               else if (vector_operation == VectorOperation::max)
                 {
-                  for (auto const &import_indices_plain :
+                  for (const auto &import_indices_plain :
                        import_indices_plain_dev)
                     {
                       const auto chunk_size = import_indices_plain.size();
@@ -677,7 +677,7 @@ namespace Utilities
                 }
               else
                 {
-                  for (auto const &import_indices_plain :
+                  for (const auto &import_indices_plain :
                        import_indices_plain_dev)
                     {
                       // We can't easily assert here, so we just move the
index af593ce065753f646487e970d3e69e7262ed2ac4..8b7cd965910a73b78becbf6b789bd91973cd3436 100644 (file)
@@ -94,9 +94,9 @@ namespace internal
     struct nonesuch : private nonesuch_base
     {
       ~nonesuch()                = delete;
-      nonesuch(nonesuch const &) = delete;
+      nonesuch(const nonesuch &) = delete;
       void
-      operator=(nonesuch const &) = delete;
+      operator=(const nonesuch &) = delete;
     };
 
     template <class Default, template <class...> class Op, class... Args>
index d20c98b43378780d00b7655f74851f62c0589990..f1798a2fc878bd4d6b9906d9657fe22c862a7f42 100644 (file)
@@ -1813,7 +1813,7 @@ namespace FETools
             // sufficiently large so that there
             // are more than about 5000
             // operations in the inner loop
-            // (which is basically const * n^2
+            // (which is const basically * n^2
             // operations).
             if (n > 30)
               {
index 45884ba276db9a99d6abf4ade7868ea20508b469..7be2547c0df73a97c9736047547bbeeb6835a06d 100644 (file)
@@ -47,13 +47,13 @@ DEAL_II_NAMESPACE_OPEN
 namespace internal
 {
   template <typename T>
-  using has_block_t = decltype(std::declval<T const>().block(0));
+  using has_block_t = decltype(std::declval<const T>().block(0));
 
   template <typename T>
   constexpr bool has_block = internal::is_supported_operation<has_block_t, T>;
 
   template <typename T>
-  using has_n_blocks_t = decltype(std::declval<T const>().n_blocks());
+  using has_n_blocks_t = decltype(std::declval<const T>().n_blocks());
 
   template <typename T>
   constexpr bool has_n_blocks =
index 80e9ffca433fb943a5676f6bbe66cf1f88a3ab47..da3c17591b36313b515905b008bbe6e7a36b6c7e 100644 (file)
@@ -1342,9 +1342,9 @@ namespace PETScWrappers
     prepare_action(VectorOperation::insert);
 
     const PetscInt  petsc_i = row;
-    PetscInt const *col_index_ptr;
+    const PetscInt *col_index_ptr;
 
-    PetscScalar const *col_value_ptr;
+    const PetscScalar *col_value_ptr;
     int                n_columns;
 
     // If we don't elide zeros, the pointers are already available...
@@ -1486,9 +1486,9 @@ namespace PETScWrappers
     prepare_action(VectorOperation::add);
 
     const PetscInt  petsc_i = row;
-    PetscInt const *col_index_ptr;
+    const PetscInt *col_index_ptr;
 
-    PetscScalar const *col_value_ptr;
+    const PetscScalar *col_value_ptr;
     int                n_columns;
 
     // If we don't elide zeros, the pointers are already available...
index a0cb0f2eece9ee1720409e94cd4757965af6a72c..1a5146224f205281448edfd0bd16b75b9c8c264a 100644 (file)
@@ -530,7 +530,7 @@ namespace internal
   // ... MatrixType::vmult(VectorType &, const VectorType&,
   // std::function<...>, std::function<...>) const
   template <typename MatrixType, typename VectorType>
-  using vmult_functions_t = decltype(std::declval<MatrixType const>().vmult(
+  using vmult_functions_t = decltype(std::declval<const MatrixType>().vmult(
     std::declval<VectorType &>(),
     std::declval<const VectorType &>(),
     std::declval<
@@ -560,7 +560,7 @@ namespace internal
   {
     template <typename T, typename VectorType>
     using Tvmult_t = decltype(
-      std::declval<T const>().Tvmult(std::declval<VectorType &>(),
+      std::declval<const T>().Tvmult(std::declval<VectorType &>(),
                                      std::declval<const VectorType &>()));
 
     template <typename T, typename VectorType>
@@ -568,7 +568,7 @@ namespace internal
 
     template <typename T, typename VectorType>
     using step_t = decltype(
-      std::declval<T const>().step(std::declval<VectorType &>(),
+      std::declval<const T>().step(std::declval<VectorType &>(),
                                    std::declval<const VectorType &>()));
 
     template <typename T, typename VectorType>
@@ -576,7 +576,7 @@ namespace internal
 
     template <typename T, typename VectorType>
     using step_omega_t =
-      decltype(std::declval<T const>().step(std::declval<VectorType &>(),
+      decltype(std::declval<const T>().step(std::declval<VectorType &>(),
                                             std::declval<const VectorType &>(),
                                             std::declval<const double>()));
 
@@ -586,7 +586,7 @@ namespace internal
 
     template <typename T, typename VectorType>
     using Tstep_t = decltype(
-      std::declval<T const>().Tstep(std::declval<VectorType &>(),
+      std::declval<const T>().Tstep(std::declval<VectorType &>(),
                                     std::declval<const VectorType &>()));
 
     template <typename T, typename VectorType>
@@ -594,7 +594,7 @@ namespace internal
 
     template <typename T, typename VectorType>
     using Tstep_omega_t =
-      decltype(std::declval<T const>().Tstep(std::declval<VectorType &>(),
+      decltype(std::declval<const T>().Tstep(std::declval<VectorType &>(),
                                              std::declval<const VectorType &>(),
                                              std::declval<const double>()));
 
@@ -604,7 +604,7 @@ namespace internal
 
     template <typename T, typename VectorType>
     using jacobi_step_t = decltype(
-      std::declval<T const>().Jacobi_step(std::declval<VectorType &>(),
+      std::declval<const T>().Jacobi_step(std::declval<VectorType &>(),
                                           std::declval<const VectorType &>(),
                                           std::declval<const double>()));
 
@@ -614,7 +614,7 @@ namespace internal
 
     template <typename T, typename VectorType>
     using SOR_step_t = decltype(
-      std::declval<T const>().SOR_step(std::declval<VectorType &>(),
+      std::declval<const T>().SOR_step(std::declval<VectorType &>(),
                                        std::declval<const VectorType &>(),
                                        std::declval<const double>()));
 
@@ -624,7 +624,7 @@ namespace internal
 
     template <typename T, typename VectorType>
     using SSOR_step_t = decltype(
-      std::declval<T const>().SSOR_step(std::declval<VectorType &>(),
+      std::declval<const T>().SSOR_step(std::declval<VectorType &>(),
                                         std::declval<const VectorType &>(),
                                         std::declval<const double>()));
 
index 413577eca019b0aae3b4f4506f41464b7418630f..f2503345bd1304c36ab32a6ae6a1e022049dec45 100644 (file)
@@ -505,7 +505,7 @@ extern "C"
    * norm, or the element of largest absolute value of a distributed matrix
    */
   double
-  pdlange_(char const *  norm,
+  pdlange_(const char *  norm,
            const int *   m,
            const int *   n,
            const double *A,
index 8099ffbbcf6fb77a45557ab4a1d83584b29aa1a2..95287056f3910278769a2eaf61eb9a6b4e6df8f3 100644 (file)
@@ -656,7 +656,7 @@ namespace internal
     // ... MatrixType::vmult(VectorType &, const VectorType&,
     // std::function<...>, std::function<...>) const
     template <typename MatrixType, typename VectorType>
-    using vmult_functions_t = decltype(std::declval<MatrixType const>().vmult(
+    using vmult_functions_t = decltype(std::declval<const MatrixType>().vmult(
       std::declval<VectorType &>(),
       std::declval<const VectorType &>(),
       std::declval<
@@ -673,7 +673,7 @@ namespace internal
     // unsigned int, const unsigned int, const Number*, Number*) const
     template <typename PreconditionerType>
     using apply_to_subrange_t =
-      decltype(std::declval<PreconditionerType const>()
+      decltype(std::declval<const PreconditionerType>()
                  .apply_to_subrange(0U, 0U, nullptr, nullptr));
 
     template <typename PreconditionerType>
@@ -685,7 +685,7 @@ namespace internal
     // unsigned int, const Number) const
     template <typename PreconditionerType>
     using apply_t =
-      decltype(std::declval<PreconditionerType const>().apply(0U, 0.0));
+      decltype(std::declval<const PreconditionerType>().apply(0U, 0.0));
 
     template <typename PreconditionerType>
     constexpr bool has_apply =
index 1e004c275fb6b6bc3258bd257645078599baf8f7..cee81e6a057361eed456af870bd811fbbf54b154 100644 (file)
@@ -170,14 +170,14 @@ namespace SparseMatrixTools
 
     template <typename T>
     using get_mpi_communicator_t =
-      decltype(std::declval<T const>().get_mpi_communicator());
+      decltype(std::declval<const T>().get_mpi_communicator());
 
     template <typename T>
     constexpr bool has_get_mpi_communicator =
       dealii::internal::is_supported_operation<get_mpi_communicator_t, T>;
 
     template <typename T>
-    using local_size_t = decltype(std::declval<T const>().local_size());
+    using local_size_t = decltype(std::declval<const T>().local_size());
 
     template <typename T>
     constexpr bool has_local_size =
index bfdfb353651d05f0b75d3d2f9d9f28fac1e3f1c7..265cb73e04677bd89d61c590b11b184bbcb4456f 100644 (file)
@@ -38,7 +38,7 @@ namespace internal
   // a helper type-trait that leverage SFINAE to figure out if type T has
   // ... T::local_element() const
   template <typename T>
-  using local_element_t = decltype(std::declval<T const>().local_element(0));
+  using local_element_t = decltype(std::declval<const T>().local_element(0));
 
   template <typename T>
   constexpr bool has_local_element = is_supported_operation<local_element_t, T>;
@@ -74,7 +74,7 @@ namespace internal
   // const
   template <typename T>
   using partitioners_are_compatible_t =
-    decltype(std::declval<T const>().partitioners_are_compatible(
+    decltype(std::declval<const T>().partitioners_are_compatible(
       std::declval<Utilities::MPI::Partitioner>()));
 
   template <typename T>
@@ -86,7 +86,7 @@ namespace internal
   // same as above to check
   // ... T::begin() const
   template <typename T>
-  using begin_t = decltype(std::declval<T const>().begin());
+  using begin_t = decltype(std::declval<const T>().begin());
 
   template <typename T>
   constexpr bool has_begin = is_supported_operation<begin_t, T>;
@@ -97,7 +97,7 @@ namespace internal
   // ... T::shared_vector_data() const
   template <typename T>
   using shared_vector_data_t =
-    decltype(std::declval<T const>().shared_vector_data());
+    decltype(std::declval<const T>().shared_vector_data());
 
   template <typename T>
   constexpr bool has_shared_vector_data =
@@ -138,7 +138,7 @@ namespace internal
   // void T::update_ghost_values_start(const uint) const
   template <typename T>
   using update_ghost_values_start_t =
-    decltype(std::declval<T const>().update_ghost_values_start(0));
+    decltype(std::declval<const T>().update_ghost_values_start(0));
 
   template <typename T>
   constexpr bool has_update_ghost_values_start =
index 00b982228a10eb643f3baac393765299de03ad67..68a665829c51137399e5a3e1495e9336b9659803 100644 (file)
@@ -2000,7 +2000,7 @@ namespace internal
       }
 
       // ------------------------- prolongation matrix -------------------------
-      for (auto const &fe_index_pair_ : fe_index_pairs)
+      for (const auto &fe_index_pair_ : fe_index_pairs)
         {
           const auto &fe_index_pair = fe_index_pair_.first;
           const auto &fe_index_no   = fe_index_pair_.second;
index 645f4239fea3f8d59aae81e5af861c299ec5c422..46d7ee87d6d2a263432d983f1c21e63ad0134ebf 100644 (file)
@@ -982,8 +982,8 @@ namespace MatrixCreator
   {
     template <int dim, int spacedim, typename number>
     void static inline create_boundary_mass_matrix_1(
-      typename DoFHandler<dim, spacedim>::active_cell_iterator const &cell,
-      MatrixCreator::internal::AssemblerBoundary::Scratch const &,
+      const typename DoFHandler<dim, spacedim>::active_cell_iterator &cell,
+      const MatrixCreator::internal::AssemblerBoundary::Scratch &,
       MatrixCreator::internal::AssemblerBoundary::
         CopyData<dim, spacedim, number> & copy_data,
       Mapping<dim, spacedim> const &      mapping,
@@ -1291,8 +1291,8 @@ namespace MatrixCreator
 
     template <>
     void inline create_boundary_mass_matrix_1<1, 3, float>(
-      DoFHandler<1, 3>::active_cell_iterator const & /*cell*/,
-      MatrixCreator::internal::AssemblerBoundary::Scratch const &,
+      const DoFHandler<1, 3>::active_cell_iterator & /*cell*/,
+      const MatrixCreator::internal::AssemblerBoundary::Scratch &,
       MatrixCreator::internal::AssemblerBoundary::CopyData<1, 3, float>
         & /*copy_data*/,
       Mapping<1, 3> const &,
@@ -1308,8 +1308,8 @@ namespace MatrixCreator
 
     template <>
     void inline create_boundary_mass_matrix_1<1, 3, double>(
-      DoFHandler<1, 3>::active_cell_iterator const & /*cell*/,
-      MatrixCreator::internal::AssemblerBoundary::Scratch const &,
+      const DoFHandler<1, 3>::active_cell_iterator & /*cell*/,
+      const MatrixCreator::internal::AssemblerBoundary::Scratch &,
       MatrixCreator::internal::AssemblerBoundary::CopyData<1, 3, double>
         & /*copy_data*/,
       Mapping<1, 3> const &,
@@ -1381,8 +1381,8 @@ namespace MatrixCreator
       dof.begin_active(),
       dof.end(),
       [&mapping, &fe, &q, &boundary_functions, coefficient, &component_mapping](
-        typename DoFHandler<dim, spacedim>::active_cell_iterator const &cell,
-        MatrixCreator::internal::AssemblerBoundary::Scratch const &scratch_data,
+        const typename DoFHandler<dim, spacedim>::active_cell_iterator &cell,
+        const MatrixCreator::internal::AssemblerBoundary::Scratch &scratch_data,
         MatrixCreator::internal::AssemblerBoundary::
           CopyData<dim, spacedim, number> &copy_data) {
         internal::create_boundary_mass_matrix_1(cell,
@@ -1415,8 +1415,8 @@ namespace MatrixCreator
     template <int dim, int spacedim, typename number>
     void
     create_hp_boundary_mass_matrix_1(
-      typename DoFHandler<dim, spacedim>::active_cell_iterator const &cell,
-      MatrixCreator::internal::AssemblerBoundary::Scratch const &,
+      const typename DoFHandler<dim, spacedim>::active_cell_iterator &cell,
+      const MatrixCreator::internal::AssemblerBoundary::Scratch &,
       MatrixCreator::internal::AssemblerBoundary ::
         CopyData<dim, spacedim, number> &         copy_data,
       hp::MappingCollection<dim, spacedim> const &mapping,
@@ -1857,8 +1857,8 @@ namespace MatrixCreator
        &boundary_functions,
        coefficient,
        &component_mapping](
-        typename DoFHandler<dim, spacedim>::active_cell_iterator const &cell,
-        MatrixCreator::internal::AssemblerBoundary::Scratch const &scratch_data,
+        const typename DoFHandler<dim, spacedim>::active_cell_iterator &cell,
+        const MatrixCreator::internal::AssemblerBoundary::Scratch &scratch_data,
         MatrixCreator::internal::AssemblerBoundary ::
           CopyData<dim, spacedim, number> &copy_data) {
         internal::create_hp_boundary_mass_matrix_1(cell,
index 054104efa230f74d21039e739ab8998658f6ddca..19605c65fa9e15aac7d48f9851b402e215f26a04 100644 (file)
@@ -216,7 +216,7 @@ public:
   /**
    * Constructor. Store a const reference to a container.
    */
-  explicit IndexableGetterFromIndices(Container const &c)
+  explicit IndexableGetterFromIndices(const Container &c)
     : container(c)
   {}
 
@@ -334,7 +334,7 @@ struct ExtractLevelVisitor
    * @p target_level of the tree.
    */
   inline ExtractLevelVisitor(
-    Translator const & translator,
+    const Translator & translator,
     const unsigned int target_level,
     std::vector<BoundingBox<boost::geometry::dimension<Box>::value>> &boxes);
 
@@ -364,18 +364,18 @@ struct ExtractLevelVisitor
    * belongs to the @p target_level, then fill the bounding box vector.
    */
   inline void
-  operator()(InternalNode const &node);
+  operator()(const InternalNode &node);
 
   /**
    * Implements the visitor interface for Leaf objects.
    */
   inline void
-  operator()(Leaf const &);
+  operator()(const Leaf &);
 
   /**
    * Translator interface, required by the boost implementation of the rtree.
    */
-  Translator const &translator;
+  const Translator &translator;
 
   /**
    * Store the level we are currently visiting.
@@ -683,18 +683,18 @@ struct NodeVisitor : public boost::geometry::index::detail::rtree::visitor<
    * belongs to the level next to @p target_level, then fill the bounding box vector for that node.
    */
   inline void
-  operator()(InternalNode const &node);
+  operator()(const InternalNode &node);
 
   /**
    * Implements the visitor interface for Leaf objects.
    */
   inline void
-  operator()(Leaf const &);
+  operator()(const Leaf &);
 
   /**
    * Translator interface, required by the boost implementation of the rtree.
    */
-  Translator const &translator;
+  const Translator &translator;
 
   /**
    * Store the level we are currently visiting.
index 4734b0cf5d0020adfb5876e38e378fa25ab9f34f..aa4366c861c781b4daf1d1e60fbf838ee199fcff 100644 (file)
@@ -232,7 +232,7 @@ namespace VectorTools
             q_collection,
             update_quadrature_points);
 
-          for (auto const &cell : dof.active_cell_iterators())
+          for (const auto &cell : dof.active_cell_iterators())
             if (!cell->is_artificial())
               for (const unsigned int face_no : cell->face_indices())
                 {
index 6f629182efa4936c6d8a9202f7e46ef627186108..8c3e153cd1994fee3d298cc4fbcfe36bcb8fa89f 100644 (file)
@@ -626,7 +626,7 @@ namespace Polynomials
 
     unsigned int n_functions = n + 1;
     AssertIndexRange(support_point, n_functions);
-    double const *x = nullptr;
+    const double *x = nullptr;
 
     switch (n)
       {
index 7f362501f8793d75323443ada89e82633e53ecbc..657799cbe390aab84af99a0920e7221bb744c1b1 100644 (file)
@@ -191,7 +191,7 @@ namespace parallel
           out.local_element(i) = std::numeric_limits<Number>::infinity();
 
         unsigned int cell_i = 0;
-        for (auto const &cell : dof_handler.active_cell_iterators())
+        for (const auto &cell : dof_handler.active_cell_iterators())
           {
             if ((cell->is_locally_owned()) &&
                 (transferred_data[cell_i][0] !=
index 3596ea4bc95903fd002757e818177a55efdd4eb1..0afa94b2228dfa3af228c545256e3b683a210e50 100644 (file)
@@ -908,8 +908,8 @@ namespace internal
 
     template <>
     bool
-    quadrant_is_ancestor<1>(types<1>::quadrant const &q1,
-                            types<1>::quadrant const &q2)
+    quadrant_is_ancestor<1>(const types<1>::quadrant &q1,
+                            const types<1>::quadrant &q2)
     {
       // determine level of quadrants
       const int level_1 = (q1 << types<1>::max_n_child_indices_bits) >>
index 457f72a6ff9dc7779a007989796c47680c109927..39d6d13997ddbc2f8498b5fff7f81fb9b4e70112 100644 (file)
@@ -93,7 +93,7 @@ namespace internal
    */
   template <typename T>
   using set_ghost_state_t =
-    decltype(std::declval<T const>().set_ghost_state(std::declval<bool>()));
+    decltype(std::declval<const T>().set_ghost_state(std::declval<bool>()));
 
   template <typename T>
   constexpr bool has_set_ghost_state =
index 86669327c50afb2276e9c7eba09f556f2a4f9375..a3062a5910ba70ca96ff94e8c7b990c0bebc5906 100644 (file)
@@ -6561,7 +6561,7 @@ namespace GridGenerator
           {
             for (const auto &cell : tria->cell_iterators())
               {
-                for (auto const &f : cell->face_indices())
+                for (const auto &f : cell->face_indices())
                   if (result_cell->face(f)->at_boundary())
                     result_cell->face(f)->set_boundary_id(
                       cell->face(f)->boundary_id());
index 17de2bbbcc220cc6bb7c7e6dc27a484afee94290..7b7ad67ad22c636ed872906f89cb459b774eccd4 100644 (file)
@@ -6402,7 +6402,7 @@ namespace GridTools
       // requested intersections are unique also the resulting quadrature
       // points are unique and we can simply number the points in an
       // ascending way.
-      for (auto const &recv_component : recv_components)
+      for (const auto &recv_component : recv_components)
         {
           // dependent on the size of the intersection an empty quadrature
           // is returned. Therefore, we have to compute the quadrature also
@@ -6755,7 +6755,7 @@ namespace GridTools
                     CGALWrappers::resort_dealii_vertices_to_cgal_order(
                       structdim, requested_intersection);
 
-                    auto const &try_intersection =
+                    const auto &try_intersection =
                       CGALWrappers::get_vertices_in_cgal_order(
                         cell, cache.get_mapping());
 
index 691489c76d3f0c93a2432624182d16de7741c388..d61405f461e430798c9ef5c1db6421853803a5ec 100644 (file)
@@ -993,12 +993,12 @@ namespace DerivativeApproximation
         end,
         [&mapping, &dof_handler, &solution, component](
           SynchronousIterators<Iterators> const &cell,
-          Assembler::Scratch const &,
+          const Assembler::Scratch &,
           Assembler::CopyData &) {
           approximate<DerivativeDescription, dim, InputVector, spacedim>(
             cell, mapping, dof_handler, solution, component);
         },
-        std::function<void(internal::Assembler::CopyData const &)>(),
+        std::function<void(const internal::Assembler::CopyData &)>(),
         internal::Assembler::Scratch(),
         internal::Assembler::CopyData());
     }
index 409ea4b2db840acb196c50e3f9915f2fda8555cc..7e500d4a4b3ddade9e48543eb22aa3ec80d50eae 100644 (file)
@@ -476,7 +476,7 @@ namespace Particles
       // Memory is reserved for efficiency reasons
       std::vector<Point<spacedim>> support_points_vec;
       support_points_vec.reserve(support_points_map.size());
-      for (auto const &element : support_points_map)
+      for (const auto &element : support_points_map)
         support_points_vec.push_back(element.second);
 
       particle_handler.insert_global_particles(support_points_vec,
index d05ba170cfaf3d328ed4bffdd9f05b79775f9031..b2dfd422182ebe884e8ef306df7aeac0158fd90d 100644 (file)
@@ -38,7 +38,7 @@
 template <int dim>
 std::vector<types::global_dof_index>
 get_conflict_indices_cfem(
-  typename DoFHandler<dim>::active_cell_iterator const &it)
+  typename DoFHandler<dim>::active_cell_const iterator &it)
 {
   std::vector<types::global_dof_index> local_dof_indices(
     it->get_fe().dofs_per_cell);
@@ -67,7 +67,7 @@ check()
       cell,
       dof_handler.end(),
       std::function<std::vector<types::global_dof_index>(
-        typename DoFHandler<dim>::active_cell_iterator const &)>(
+        typename DoFHandler<dim>::active_cell_const iterator &)>(
         &get_conflict_indices_cfem<dim>)));
 
   // Output the coloring
index 1a5afed726a9cf359aed1e7ca0699e9b4077d0ee..7febd009c3534017425a08f9e085d601ca023a01 100644 (file)
@@ -38,7 +38,7 @@
 template <int dim>
 std::vector<types::global_dof_index>
 get_conflict_indices_cfem(
-  typename DoFHandler<dim>::active_cell_iterator const &it)
+  typename DoFHandler<dim>::active_cell_const iterator &it)
 {
   std::vector<types::global_dof_index> local_dof_indices(
     it->get_fe().dofs_per_cell);
@@ -76,7 +76,7 @@ check()
       dof_handler.begin_active(),
       dof_handler.end(),
       std::function<std::vector<types::global_dof_index>(
-        typename DoFHandler<dim>::active_cell_iterator const &)>(
+        typename DoFHandler<dim>::active_cell_const iterator &)>(
         &get_conflict_indices_cfem<dim>)));
 
   // Output the coloring
index 2be3e18926390b96c672eaa8a4633cd72b5fa6db..bc3bfb0e99a84568e1d820f4ffb8956937fc3c75 100644 (file)
@@ -38,7 +38,7 @@
 template <int dim>
 std::vector<types::global_dof_index>
 get_conflict_indices_cfem(
-  typename DoFHandler<dim>::active_cell_iterator const &it)
+  typename DoFHandler<dim>::active_cell_const iterator &it)
 {
   std::vector<types::global_dof_index> local_dof_indices(
     it->get_fe().dofs_per_cell);
@@ -78,7 +78,7 @@ check()
       dof_handler.begin_active(),
       dof_handler.end(),
       std::function<std::vector<types::global_dof_index>(
-        typename DoFHandler<dim>::active_cell_iterator const &)>(
+        typename DoFHandler<dim>::active_cell_const iterator &)>(
         &get_conflict_indices_cfem<dim>)));
 
   // verify that within each color, there is no conflict
index 9437102452fc1102ef7494e3e1f5d0a72ce93a02..7543c9b3df9aede14d692433f5945f2ad4467ea4 100644 (file)
@@ -38,7 +38,7 @@
 template <int dim>
 std::vector<types::global_dof_index>
 get_conflict_indices_cfem(
-  typename DoFHandler<dim>::active_cell_iterator const &it)
+  typename DoFHandler<dim>::active_cell_const iterator &it)
 {
   std::vector<types::global_dof_index> local_dof_indices(
     it->get_fe().dofs_per_cell);
@@ -79,7 +79,7 @@ check()
       dof_handler.begin_active(),
       dof_handler.end(),
       std::function<std::vector<types::global_dof_index>(
-        typename DoFHandler<dim>::active_cell_iterator const &)>(
+        typename DoFHandler<dim>::active_cell_const iterator &)>(
         &get_conflict_indices_cfem<dim>)));
 
   // Output the coloring
index 53d3febe06af8b41fb86d68654b459568a72cdca..c71be40045fba15873bd2c8353db67214778f378 100644 (file)
@@ -39,7 +39,7 @@
 template <int dim>
 std::vector<types::global_dof_index>
 get_conflict_indices_cfem(
-  typename DoFHandler<dim>::active_cell_iterator const &it)
+  typename DoFHandler<dim>::active_cell_const iterator &it)
 {
   std::vector<types::global_dof_index> local_dof_indices(
     it->get_fe().dofs_per_cell);
@@ -77,7 +77,7 @@ check()
       dof_handler.begin_active(),
       dof_handler.end(),
       std::function<std::vector<types::global_dof_index>(
-        typename DoFHandler<dim>::active_cell_iterator const &)>(
+        typename DoFHandler<dim>::active_cell_const iterator &)>(
         &get_conflict_indices_cfem<dim>)));
 
   // Check that a color does not contain a conflict index twice
index ce5b10cbf6d016a94be50fc9de0bb5724e23f7bd..02357f59e56c3582f63a7ef0d217afa329a02c1f 100644 (file)
@@ -38,7 +38,7 @@
 template <int dim>
 std::vector<types::global_dof_index>
 get_conflict_indices_cfem(
-  typename DoFHandler<dim>::active_cell_iterator const &it)
+  typename DoFHandler<dim>::active_cell_const iterator &it)
 {
   std::vector<types::global_dof_index> local_dof_indices(
     it->get_fe().dofs_per_cell);
@@ -82,7 +82,7 @@ check()
       dof_handler.begin_active(),
       dof_handler.end(),
       std::function<std::vector<types::global_dof_index>(
-        typename DoFHandler<dim>::active_cell_iterator const &)>(
+        typename DoFHandler<dim>::active_cell_const iterator &)>(
         &get_conflict_indices_cfem<dim>));
 
   for (unsigned int color = 0; color < coloring.size(); ++color)
index c43eaedadc746b0670b697c3d597a08dc0700bbe..36b63f85677cf53e6e5b3c114f019d9d8e18ce47 100644 (file)
@@ -41,7 +41,7 @@ main(int argc, char *argv[])
   auto received_pts = Utilities::MPI::some_to_some(MPI_COMM_WORLD, m);
 
   bool test_passed = true;
-  for (auto const &pt : received_pts)
+  for (const auto &pt : received_pts)
     if (std::abs(pt.first - pt.second[0][0]) > 1e-12 ||
         std::abs(2.0 * pt.first + pt.second[0][1]) > 1e-12)
       {
index 941e73c7a64c2d9d2315e1df26f45e80a3d20ab5..76a6a01227b02ea0cce274d2537a60d32a6761ab 100644 (file)
@@ -54,9 +54,9 @@ test_vertex_order()
   for (const auto &cell : tria.active_cell_iterators())
     for (unsigned int f = 0; f < cell->n_faces(); ++f)
       {
-        auto const &vertices_detour =
+        const auto &vertices_detour =
           get_vertices(cell, cell->face(f), mapping);
-        auto const &vertices = mapping.get_vertices(cell, f);
+        const auto &vertices = mapping.get_vertices(cell, f);
 
         AssertDimension(vertices_detour.size(), vertices.size());
 
index 567f829ce9c06e8a6ad5b7bad988d70b5693fe23..fe116778631d6530959f38b0755fee601c81f35b 100644 (file)
@@ -140,7 +140,7 @@ test()
 
   for (auto cell : tria.cell_iterators())
     {
-      for (auto const &v : cell->vertex_indices())
+      for (const auto &v : cell->vertex_indices())
         {
           if (vertex_touched[cell->vertex_index(v)] == false)
             {
index cc4ee5ada1b5ee8075b80c8d5ea80e04cac448ae..9f100a4b0a18b2f9d366426227dc9e6b6d1ad7cc 100644 (file)
@@ -141,7 +141,7 @@ test()
 
   for (auto cell : tria.cell_iterators())
     {
-      for (auto const &v : cell->vertex_indices())
+      for (const auto &v : cell->vertex_indices())
         {
           if (vertex_touched[cell->vertex_index(v)] == false)
             {
index 9ecf93ae9a661d61d27ea4181c1894a07c725e3f..1e385bc37d7a6fdc327a30047fbf1b2a8566f087 100644 (file)
@@ -128,7 +128,7 @@ private:
 
   std::vector<types::global_dof_index>
   get_conflict_indices(
-    typename DoFHandler<dim>::active_cell_iterator const &cell) const;
+    typename DoFHandler<dim>::active_cell_const iterator &cell) const;
 
   Triangulation<dim> triangulation;
 
@@ -238,7 +238,7 @@ LaplaceProblem<dim>::~LaplaceProblem()
 template <int dim>
 std::vector<types::global_dof_index>
 LaplaceProblem<dim>::get_conflict_indices(
-  typename DoFHandler<dim>::active_cell_iterator const &cell) const
+  typename DoFHandler<dim>::active_cell_const iterator &cell) const
 {
   std::vector<types::global_dof_index> local_dof_indices(
     cell->get_fe().dofs_per_cell);
@@ -278,7 +278,7 @@ LaplaceProblem<dim>::setup_system()
     dof_handler.begin_active(),
     dof_handler.end(),
     static_cast<std::function<std::vector<types::global_dof_index>(
-      typename DoFHandler<dim>::active_cell_iterator const &)>>(
+      typename DoFHandler<dim>::active_cell_const iterator &)>>(
       std::bind(&LaplaceProblem<dim>::get_conflict_indices,
                 this,
                 std::placeholders::_1)));
index 2ca3fed1e0893c88979aad645691f66a3eec5295..86e9c3c5476ef5f14211d3580c2647a08bab38f3 100644 (file)
@@ -143,7 +143,7 @@ private:
 
   std::vector<types::global_dof_index>
   get_conflict_indices(
-    typename DoFHandler<dim>::active_cell_iterator const &cell) const;
+    typename DoFHandler<dim>::active_cell_const iterator &cell) const;
 
   Triangulation<dim> triangulation;
 
@@ -255,7 +255,7 @@ LaplaceProblem<dim>::~LaplaceProblem()
 template <int dim>
 std::vector<types::global_dof_index>
 LaplaceProblem<dim>::get_conflict_indices(
-  typename DoFHandler<dim>::active_cell_iterator const &cell) const
+  typename DoFHandler<dim>::active_cell_const iterator &cell) const
 {
   std::vector<types::global_dof_index> local_dof_indices(
     cell->get_fe().dofs_per_cell);
@@ -296,7 +296,7 @@ LaplaceProblem<dim>::setup_system()
     dof_handler.begin_active(),
     dof_handler.end(),
     static_cast<std::function<std::vector<types::global_dof_index>(
-      typename DoFHandler<dim>::active_cell_iterator const &)>>(
+      typename DoFHandler<dim>::active_cell_const iterator &)>>(
       std::bind(&LaplaceProblem<dim>::get_conflict_indices,
                 this,
                 std::placeholders::_1)));
index 32ae6f59cc81cc10e52fcf9543d8e2ff11dba0bb..452f0ef839d7b2172487822164d7150bcf8b784f 100644 (file)
@@ -128,7 +128,7 @@ private:
 
   std::vector<types::global_dof_index>
   get_conflict_indices(
-    typename DoFHandler<dim>::active_cell_iterator const &cell) const;
+    typename DoFHandler<dim>::active_cell_const iterator &cell) const;
 
   Triangulation<dim> triangulation;
 
@@ -238,7 +238,7 @@ LaplaceProblem<dim>::~LaplaceProblem()
 template <int dim>
 std::vector<types::global_dof_index>
 LaplaceProblem<dim>::get_conflict_indices(
-  typename DoFHandler<dim>::active_cell_iterator const &cell) const
+  typename DoFHandler<dim>::active_cell_const iterator &cell) const
 {
   std::vector<types::global_dof_index> local_dof_indices(
     cell->get_fe().dofs_per_cell);
@@ -278,7 +278,7 @@ LaplaceProblem<dim>::setup_system()
     dof_handler.begin_active(),
     dof_handler.end(),
     static_cast<std::function<std::vector<types::global_dof_index>(
-      typename DoFHandler<dim>::active_cell_iterator const &)>>(
+      typename DoFHandler<dim>::active_cell_const iterator &)>>(
       std::bind(&LaplaceProblem<dim>::get_conflict_indices,
                 this,
                 std::placeholders::_1)));
index 90ebbc0c84377a3d14aa7e45d12b44b824addcc5..81c93ce19b2dd15c078dbe27c193f3012bc2139b 100644 (file)
@@ -142,7 +142,7 @@ private:
 
   std::vector<types::global_dof_index>
   get_conflict_indices(
-    typename DoFHandler<dim>::active_cell_iterator const &cell) const;
+    typename DoFHandler<dim>::active_cell_const iterator &cell) const;
 
   Triangulation<dim> triangulation;
 
@@ -254,7 +254,7 @@ LaplaceProblem<dim>::~LaplaceProblem()
 template <int dim>
 std::vector<types::global_dof_index>
 LaplaceProblem<dim>::get_conflict_indices(
-  typename DoFHandler<dim>::active_cell_iterator const &cell) const
+  typename DoFHandler<dim>::active_cell_const iterator &cell) const
 {
   std::vector<types::global_dof_index> local_dof_indices(
     cell->get_fe().dofs_per_cell);
@@ -308,7 +308,7 @@ LaplaceProblem<dim>::setup_system()
     dof_handler.begin_active(),
     dof_handler.end(),
     static_cast<std::function<std::vector<types::global_dof_index>(
-      typename DoFHandler<dim>::active_cell_iterator const &)>>(
+      typename DoFHandler<dim>::active_cell_const iterator &)>>(
       std::bind(&LaplaceProblem<dim>::get_conflict_indices,
                 this,
                 std::placeholders::_1)));
index 714d4f67e7af94ab79b3ea9d0ff6307faf6abca9..a028c9a85ed12b366678c52364778320da7d18a6 100644 (file)
@@ -127,7 +127,7 @@ private:
 
   std::vector<types::global_dof_index>
   get_conflict_indices(
-    typename DoFHandler<dim>::active_cell_iterator const &cell) const;
+    typename DoFHandler<dim>::active_cell_const iterator &cell) const;
 
   Triangulation<dim> triangulation;
 
@@ -235,7 +235,7 @@ LaplaceProblem<dim>::~LaplaceProblem()
 template <int dim>
 std::vector<types::global_dof_index>
 LaplaceProblem<dim>::get_conflict_indices(
-  typename DoFHandler<dim>::active_cell_iterator const &cell) const
+  typename DoFHandler<dim>::active_cell_const iterator &cell) const
 {
   std::vector<types::global_dof_index> local_dof_indices(
     cell->get_fe().dofs_per_cell);
@@ -271,7 +271,7 @@ LaplaceProblem<dim>::setup_system()
     dof_handler.begin_active(),
     dof_handler.end(),
     static_cast<std::function<std::vector<types::global_dof_index>(
-      typename DoFHandler<dim>::active_cell_iterator const &)>>(
+      typename DoFHandler<dim>::active_cell_const iterator &)>>(
       std::bind(&LaplaceProblem<dim>::get_conflict_indices,
                 this,
                 std::placeholders::_1)));
index ccbfc0e7c7164d6fd34834fc527076db26ac8cae..71441e63704440783a057685a0dfa78216a2f403 100644 (file)
@@ -124,7 +124,7 @@ private:
 
   std::vector<types::global_dof_index>
   get_conflict_indices(
-    typename DoFHandler<dim>::active_cell_iterator const &cell) const;
+    typename DoFHandler<dim>::active_cell_const iterator &cell) const;
 
   Triangulation<dim> triangulation;
 
@@ -232,7 +232,7 @@ LaplaceProblem<dim>::~LaplaceProblem()
 template <int dim>
 std::vector<types::global_dof_index>
 LaplaceProblem<dim>::get_conflict_indices(
-  typename DoFHandler<dim>::active_cell_iterator const &cell) const
+  typename DoFHandler<dim>::active_cell_const iterator &cell) const
 {
   std::vector<types::global_dof_index> local_dof_indices(
     cell->get_fe().dofs_per_cell);
@@ -271,7 +271,7 @@ LaplaceProblem<dim>::setup_system()
     dof_handler.begin_active(),
     dof_handler.end(),
     static_cast<std::function<std::vector<types::global_dof_index>(
-      typename DoFHandler<dim>::active_cell_iterator const &)>>(
+      typename DoFHandler<dim>::active_cell_const iterator &)>>(
       std::bind(&LaplaceProblem<dim>::get_conflict_indices,
                 this,
                 std::placeholders::_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.