From: Wolfgang Bangerth Date: Tue, 3 Jun 2025 13:46:51 +0000 (-0600) Subject: Avoid comparing signed and unsigned integers. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b44fb084e8c8b2f6f53415c22633c3dc46a7038;p=dealii.git Avoid comparing signed and unsigned integers. --- diff --git a/include/deal.II/matrix_free/portable_fe_evaluation.h b/include/deal.II/matrix_free/portable_fe_evaluation.h index 0db768b51b..a294fcc708 100644 --- a/include/deal.II/matrix_free/portable_fe_evaluation.h +++ b/include/deal.II/matrix_free/portable_fe_evaluation.h @@ -519,7 +519,8 @@ namespace Portable FEEvaluation:: get_dof_value(int dof) const { - Assert(dof >= 0 && dof < tensor_dofs_per_component, ExcInternalError()); + Assert(dof >= 0 && dof < static_cast(tensor_dofs_per_component), + ExcInternalError()); if constexpr (n_components_ == 1) { return shared_data->values(dof, 0); diff --git a/include/deal.II/matrix_free/portable_tensor_product_kernels.h b/include/deal.II/matrix_free/portable_tensor_product_kernels.h index 0ddc281e50..77d7845662 100644 --- a/include/deal.II/matrix_free/portable_tensor_product_kernels.h +++ b/include/deal.II/matrix_free/portable_tensor_product_kernels.h @@ -59,8 +59,8 @@ namespace Portable const ViewTypeIn src, const int N) { - Assert(dst.size() >= N, ExcInternalError()); - Assert(src.size() >= N, ExcInternalError()); + Assert(dst.size() >= static_cast(N), ExcInternalError()); + Assert(src.size() >= static_cast(N), ExcInternalError()); Kokkos::parallel_for(Kokkos::TeamVectorRange(team_member, N), [&](const int i) { if constexpr (add) diff --git a/include/deal.II/matrix_free/tools.h b/include/deal.II/matrix_free/tools.h index 0ada9ef472..4df36ef025 100644 --- a/include/deal.II/matrix_free/tools.h +++ b/include/deal.II/matrix_free/tools.h @@ -1420,7 +1420,7 @@ namespace MatrixFreeTools Kokkos::parallel_for( Kokkos::TeamThreadRange(data->team_member, dofs_per_cell / n_components), - [&](int j) { + [&](unsigned int j) { typename decltype(fe_eval)::value_type val = {}; if constexpr (n_components == 1)