From 4ba36e8a3f186f9cb700a58480fe2384fd8cac6c Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Thu, 15 May 2025 08:37:02 -0400 Subject: [PATCH] Fix clang-tidy --- source/distributed/fully_distributed_tria.cc | 4 ++-- source/fe/fe_system.cc | 2 +- source/fe/fe_values_base.cc | 4 ++-- source/grid/grid_generator.cc | 4 ++-- source/grid/grid_out.cc | 2 +- source/grid/tria.cc | 4 ++-- source/multigrid/mg_level_global_transfer.cc | 16 ++++++++-------- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/source/distributed/fully_distributed_tria.cc b/source/distributed/fully_distributed_tria.cc index 6ea13a67fe..ce8392a457 100644 --- a/source/distributed/fully_distributed_tria.cc +++ b/source/distributed/fully_distributed_tria.cc @@ -149,8 +149,8 @@ namespace parallel for (auto &cell_info : cell_infos) std::sort(cell_info.begin(), cell_info.end(), - [&](TriangulationDescription::CellData a, - TriangulationDescription::CellData b) { + [&](const TriangulationDescription::CellData &a, + const TriangulationDescription::CellData &b) { const CellId a_id(a.id); const CellId b_id(b.id); diff --git a/source/fe/fe_system.cc b/source/fe/fe_system.cc index 0b2be1f0c4..f3c0406498 100644 --- a/source/fe/fe_system.cc +++ b/source/fe/fe_system.cc @@ -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()); }; diff --git a/source/fe/fe_values_base.cc b/source/fe/fe_values_base.cc index 20aa3d6e32..cc56ffa821 100644 --- a/source/fe/fe_values_base.cc +++ b/source/fe/fe_values_base.cc @@ -308,7 +308,7 @@ namespace internal const dealii::Table<2, double> &shape_values, const FiniteElement &fe, const std::vector &shape_function_to_row_table, - ArrayView values, + const ArrayView &values, const bool quadrature_points_fastest = false, const unsigned int component_multiple = 1) { @@ -459,7 +459,7 @@ namespace internal const dealii::Table<2, Tensor> &shape_derivatives, const FiniteElement &fe, const std::vector &shape_function_to_row_table, - ArrayView>> derivatives, + const ArrayView>> &derivatives, const bool quadrature_points_fastest = false, const unsigned int component_multiple = 1) { diff --git a/source/grid/grid_generator.cc b/source/grid/grid_generator.cc index 6ab2cb19d5..e94faf8b6d 100644 --- a/source/grid/grid_generator.cc +++ b/source/grid/grid_generator.cc @@ -7581,8 +7581,8 @@ namespace GridGenerator 100.0 * std::numeric_limits::epsilon(); auto assert_vertex_distance_within_tolerance = [center, radial_vertex_tolerance]( - const TriaIterator> face, - const double radius) { + const TriaIterator> &face, + const double radius) { (void)center; (void)radial_vertex_tolerance; (void)face; diff --git a/source/grid/grid_out.cc b/source/grid/grid_out.cc index 59c8e644a5..bfee457ec2 100644 --- a/source/grid/grid_out.cc +++ b/source/grid/grid_out.cc @@ -3128,7 +3128,7 @@ namespace generate_triangulation_patches( std::vector> &patches, ITERATOR cell, - END end) + const END &end) { // convert each of the active cells into a patch for (; cell != end; ++cell) diff --git a/source/grid/tria.cc b/source/grid/tria.cc index 34579bf5e9..39113ff0c7 100644 --- a/source/grid/tria.cc +++ b/source/grid/tria.cc @@ -12738,8 +12738,8 @@ void Triangulation::create_triangulation( std::sort( cell_info.begin(), cell_info.end(), - [&](TriangulationDescription::CellData a, - TriangulationDescription::CellData b) { + [&](const TriangulationDescription::CellData &a, + const TriangulationDescription::CellData &b) { const CellId a_id(a.id); const CellId b_id(b.id); diff --git a/source/multigrid/mg_level_global_transfer.cc b/source/multigrid/mg_level_global_transfer.cc index e5e036baf9..70f7b5ae5c 100644 --- a/source/multigrid/mg_level_global_transfer.cc +++ b/source/multigrid/mg_level_global_transfer.cc @@ -160,14 +160,14 @@ namespace template void fill_internal( - const DoFHandler &mg_dof, - ObserverPointer mg_constrained_dofs, - const MPI_Comm mpi_communicator, - const bool transfer_solution_vectors, - std::vector> ©_indices, - std::vector> ©_indices_global_mine, - std::vector> ©_indices_level_mine, - LinearAlgebra::distributed::Vector &ghosted_global_vector, + const DoFHandler &mg_dof, + const ObserverPointer &mg_constrained_dofs, + const MPI_Comm mpi_communicator, + const bool transfer_solution_vectors, + std::vector> ©_indices, + std::vector> ©_indices_global_mine, + std::vector> ©_indices_level_mine, + LinearAlgebra::distributed::Vector &ghosted_global_vector, MGLevelObject> &ghosted_level_vector) { -- 2.39.5