]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Check the value of the communication channel. 9401/head
authorDavid Wells <drwells@email.unc.edu>
Mon, 20 Jan 2020 16:38:48 +0000 (11:38 -0500)
committerDavid Wells <drwells@email.unc.edu>
Mon, 20 Jan 2020 16:56:30 +0000 (11:56 -0500)
The block vector class assumes it can use 100-199, where 200 is the
limit set by the Partitioner class.

include/deal.II/lac/la_parallel_vector.templates.h

index 101350981a9df4701191eb7cd07b2e236e0672b7..f5c3560666f7d5548944f822f03787061f2da8bf 100644 (file)
@@ -900,8 +900,7 @@ namespace LinearAlgebra
       const unsigned int                communication_channel,
       ::dealii::VectorOperation::values operation)
     {
-      (void)communication_channel;
-      (void)operation;
+      AssertIndexRange(communication_channel, 100);
       Assert(vector_is_ghosted == false,
              ExcMessage("Cannot call compress() on a ghosted vector"));
 
@@ -993,6 +992,9 @@ namespace LinearAlgebra
               import_data.values.get(), partitioner->n_import_indices()),
             compress_requests);
         }
+#else
+      (void)communication_channel;
+      (void)operation;
 #endif
     }
 
@@ -1078,6 +1080,7 @@ namespace LinearAlgebra
     Vector<Number, MemorySpaceType>::update_ghost_values_start(
       const unsigned int communication_channel) const
     {
+      AssertIndexRange(communication_channel, 100);
 #ifdef DEAL_II_WITH_MPI
       // nothing to do when we neither have import nor ghost indices.
       if (partitioner->n_ghost_indices() == 0 &&

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.