]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix clang-tidy 18455/head
authorDaniel Arndt <arndtd@ornl.gov>
Thu, 15 May 2025 12:37:02 +0000 (08:37 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Thu, 15 May 2025 21:06:19 +0000 (17:06 -0400)
source/distributed/fully_distributed_tria.cc
source/fe/fe_system.cc
source/fe/fe_values_base.cc
source/grid/grid_generator.cc
source/grid/grid_out.cc
source/grid/tria.cc
source/multigrid/mg_level_global_transfer.cc

index 6ea13a67fe187d7df364d403415f597f1f03430c..ce8392a457b2b8571fb7d6a406aa5c4b1e777f5a 100644 (file)
@@ -149,8 +149,8 @@ namespace parallel
           for (auto &cell_info : cell_infos)
             std::sort(cell_info.begin(),
                       cell_info.end(),
-                      [&](TriangulationDescription::CellData<dim> a,
-                          TriangulationDescription::CellData<dim> b) {
+                      [&](const TriangulationDescription::CellData<dim> &a,
+                          const TriangulationDescription::CellData<dim> &b) {
                         const CellId a_id(a.id);
                         const CellId b_id(b.id);
 
index 0b2be1f0c4968b7d568621347128aff05e42caed..f3c0406498b58e7764cdb9cf0b6809739639bc98 100644 (file)
@@ -146,7 +146,7 @@ namespace internal
     const unsigned int n_dofs_per_cell =
       fe.base_element(base_no).n_dofs_per_cell();
 
-    auto copy_row = [](const auto row_in, auto row_out) {
+    auto copy_row = [](const auto &row_in, const auto &row_out) {
       std::copy(row_in.begin(), row_in.end(), row_out.begin());
     };
 
index 20aa3d6e323648e0644609334ff767b1ea5f243a..cc56ffa821094ec7ffcea3f1e73e66ecba5cb03b 100644 (file)
@@ -308,7 +308,7 @@ namespace internal
     const dealii::Table<2, double>                   &shape_values,
     const FiniteElement<dim, spacedim>               &fe,
     const std::vector<unsigned int> &shape_function_to_row_table,
-    ArrayView<VectorType>            values,
+    const ArrayView<VectorType>     &values,
     const bool                       quadrature_points_fastest = false,
     const unsigned int               component_multiple        = 1)
   {
@@ -459,7 +459,7 @@ namespace internal
     const dealii::Table<2, Tensor<order, spacedim>> &shape_derivatives,
     const FiniteElement<dim, spacedim>              &fe,
     const std::vector<unsigned int> &shape_function_to_row_table,
-    ArrayView<std::vector<Tensor<order, spacedim, Number>>> derivatives,
+    const ArrayView<std::vector<Tensor<order, spacedim, Number>>> &derivatives,
     const bool         quadrature_points_fastest = false,
     const unsigned int component_multiple        = 1)
   {
index 6ab2cb19d5a4b97459307717198315b937a11a7e..e94faf8b6d6fe7bb07872007977ee41bb42c7f83 100644 (file)
@@ -7581,8 +7581,8 @@ namespace GridGenerator
       100.0 * std::numeric_limits<double>::epsilon();
     auto assert_vertex_distance_within_tolerance =
       [center, radial_vertex_tolerance](
-        const TriaIterator<TriaAccessor<dim - 1, dim, dim>> face,
-        const double                                        radius) {
+        const TriaIterator<TriaAccessor<dim - 1, dim, dim>> &face,
+        const double                                         radius) {
         (void)center;
         (void)radial_vertex_tolerance;
         (void)face;
index 59c8e644a52c20f75f443555da179c9cc137f0d1..bfee457ec2aed20c68b6ed53d8e200df2d3665bf 100644 (file)
@@ -3128,7 +3128,7 @@ namespace
   generate_triangulation_patches(
     std::vector<DataOutBase::Patch<dim, spacedim>> &patches,
     ITERATOR                                        cell,
-    END                                             end)
+    const END                                      &end)
   {
     // convert each of the active cells into a patch
     for (; cell != end; ++cell)
index 34579bf5e9a8bc54eb643ea832e747f050caeafe..39113ff0c746ef03b91e0a311bd380643fee92c8 100644 (file)
@@ -12738,8 +12738,8 @@ void Triangulation<dim, spacedim>::create_triangulation(
     std::sort(
       cell_info.begin(),
       cell_info.end(),
-      [&](TriangulationDescription::CellData<dim> a,
-          TriangulationDescription::CellData<dim> b) {
+      [&](const TriangulationDescription::CellData<dim> &a,
+          const TriangulationDescription::CellData<dim> &b) {
         const CellId a_id(a.id);
         const CellId b_id(b.id);
 
index e5e036baf9f16f35e699ad9990c814f7cbd0d462..70f7b5ae5c91a4d9f304cc06c70b187e9ff39f11 100644 (file)
@@ -160,14 +160,14 @@ namespace
   template <int dim, int spacedim, typename Number>
   void
   fill_internal(
-    const DoFHandler<dim, spacedim>            &mg_dof,
-    ObserverPointer<const MGConstrainedDoFs>    mg_constrained_dofs,
-    const MPI_Comm                              mpi_communicator,
-    const bool                                  transfer_solution_vectors,
-    std::vector<Table<2, unsigned int>>        &copy_indices,
-    std::vector<Table<2, unsigned int>>        &copy_indices_global_mine,
-    std::vector<Table<2, unsigned int>>        &copy_indices_level_mine,
-    LinearAlgebra::distributed::Vector<Number> &ghosted_global_vector,
+    const DoFHandler<dim, spacedim>                &mg_dof,
+    const ObserverPointer<const MGConstrainedDoFs> &mg_constrained_dofs,
+    const MPI_Comm                                  mpi_communicator,
+    const bool                                      transfer_solution_vectors,
+    std::vector<Table<2, unsigned int>>            &copy_indices,
+    std::vector<Table<2, unsigned int>>            &copy_indices_global_mine,
+    std::vector<Table<2, unsigned int>>            &copy_indices_level_mine,
+    LinearAlgebra::distributed::Vector<Number>     &ghosted_global_vector,
     MGLevelObject<LinearAlgebra::distributed::Vector<Number>>
       &ghosted_level_vector)
   {

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.