]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid integer comparison warning. 13476/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 1 Mar 2022 23:38:40 +0000 (16:38 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 1 Mar 2022 23:38:40 +0000 (16:38 -0700)
source/lac/trilinos_sparsity_pattern.cc

index 0216231cfb131221ea5e1c2429c6a305338ea1b2..19710f75adb37a51c6866e6cfff38a72caaa879f 100644 (file)
@@ -260,7 +260,7 @@ namespace TrilinosWrappers
       AssertThrow((TrilinosWrappers::max_my_gid(row_map) -
                    TrilinosWrappers::min_my_gid(row_map)) *
                       std::uint64_t(n_entries_per_row) <
-                    std::numeric_limits<int>::max(),
+                    static_cast<std::uint64_t>(std::numeric_limits<int>::max()),
                   ExcMessage("The TrilinosWrappers use Epetra internally which "
                              "uses 'signed int' to represent local indices. "
                              "Therefore, only 2,147,483,647 nonzero matrix "
@@ -328,7 +328,7 @@ namespace TrilinosWrappers
       AssertThrow(std::accumulate(local_entries_per_row.begin(),
                                   local_entries_per_row.end(),
                                   std::uint64_t(0)) <
-                    std::numeric_limits<int>::max(),
+                    static_cast<std::uint64_t>(std::numeric_limits<int>::max()),
                   ExcMessage("The TrilinosWrappers use Epetra internally which "
                              "uses 'signed int' to represent local indices. "
                              "Therefore, only 2,147,483,647 nonzero matrix "
@@ -389,7 +389,7 @@ namespace TrilinosWrappers
       AssertThrow(std::accumulate(n_entries_per_row.begin(),
                                   n_entries_per_row.end(),
                                   std::uint64_t(0)) <
-                    std::numeric_limits<int>::max(),
+                    static_cast<std::uint64_t>(std::numeric_limits<int>::max()),
                   ExcMessage("The TrilinosWrappers use Epetra internally which "
                              "uses 'signed int' to represent local indices. "
                              "Therefore, only 2,147,483,647 nonzero matrix "

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.