]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid comparing signed and unsigned integers. 18543/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 3 Jun 2025 13:46:51 +0000 (07:46 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 3 Jun 2025 13:53:50 +0000 (07:53 -0600)
include/deal.II/matrix_free/portable_fe_evaluation.h
include/deal.II/matrix_free/portable_tensor_product_kernels.h
include/deal.II/matrix_free/tools.h

index 0db768b51b6033384554f349c8b64cea1bd19eb5..a294fcc70878845be192f73e097cb33b3cea364b 100644 (file)
@@ -519,7 +519,8 @@ namespace Portable
   FEEvaluation<dim, fe_degree, n_q_points_1d, n_components_, Number>::
     get_dof_value(int dof) const
   {
-    Assert(dof >= 0 && dof < tensor_dofs_per_component, ExcInternalError());
+    Assert(dof >= 0 && dof < static_cast<int>(tensor_dofs_per_component),
+           ExcInternalError());
     if constexpr (n_components_ == 1)
       {
         return shared_data->values(dof, 0);
index 0ddc281e50e8d7469b38340e2d6bdfba55e70eb1..77d7845662af59cb4172dc34ef79521abb20c08a 100644 (file)
@@ -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<unsigned int>(N), ExcInternalError());
+      Assert(src.size() >= static_cast<unsigned int>(N), ExcInternalError());
       Kokkos::parallel_for(Kokkos::TeamVectorRange(team_member, N),
                            [&](const int i) {
                              if constexpr (add)
index 0ada9ef47266b1f1e8d827afc6037b6d6a9b65f0..4df36ef02501816ab15524f75ad494280815549c 100644 (file)
@@ -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)

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.