]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix wrong sign of char in MF 14797/head
authorTimo Heister <timo.heister@gmail.com>
Tue, 14 Feb 2023 22:03:23 +0000 (17:03 -0500)
committerTimo Heister <timo.heister@gmail.com>
Tue, 14 Feb 2023 22:03:23 +0000 (17:03 -0500)
On ARM char defaults to unsigned char, which will break the matrix free
face loop. Fix this by being explicit.

Fixes:
/home/ubuntu/dealii-9.4.2/include/deal.II/matrix_free/face_setup_internal.h:522:35:
warning: comparison is always false due to limited range of data type
[-Wtype-limits]

include/deal.II/matrix_free/face_setup_internal.h

index 0c188a6389c7a332e31f89eac4c153d38dfc5054..727d61a40b8f22566aec7901369883570fe0bd0b 100644 (file)
@@ -379,8 +379,8 @@ namespace internal
               // those faces, a value -1 means that the process with the lower
               // rank gets it, whereas a value 0 means that the decision can
               // be made in an arbitrary way.
-              unsigned int      n_faces_lower_proc = 0, n_faces_higher_proc = 0;
-              std::vector<char> assignment(other_range.size(), 0);
+              unsigned int n_faces_lower_proc = 0, n_faces_higher_proc = 0;
+              std::vector<signed char> assignment(other_range.size(), 0);
               if (inner_face.second.shared_faces.size() > 0)
                 {
                   // identify faces that go to the processor with the higher

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.