From: David Wells Date: Mon, 20 Jan 2020 16:38:48 +0000 (-0500) Subject: Check the value of the communication channel. X-Git-Tag: v9.2.0-rc1~628^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3712f609cc96ad431798f04b2a23a67acc38dbae;p=dealii.git Check the value of the communication channel. The block vector class assumes it can use 100-199, where 200 is the limit set by the Partitioner class. --- diff --git a/include/deal.II/lac/la_parallel_vector.templates.h b/include/deal.II/lac/la_parallel_vector.templates.h index 101350981a..f5c3560666 100644 --- a/include/deal.II/lac/la_parallel_vector.templates.h +++ b/include/deal.II/lac/la_parallel_vector.templates.h @@ -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::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 &&