From ba261cb02fe83a3091eae03c3ed29499f79372fc Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 19 Apr 2023 18:59:16 -0600 Subject: [PATCH] Make sure block vectors have blocks. --- include/deal.II/sundials/n_vector.templates.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/deal.II/sundials/n_vector.templates.h b/include/deal.II/sundials/n_vector.templates.h index 535c2f41ac..696fc8c64b 100644 --- a/include/deal.II/sundials/n_vector.templates.h +++ b/include/deal.II/sundials/n_vector.templates.h @@ -351,6 +351,9 @@ namespace SUNDIALS (void)v; return MPI_COMM_SELF; # else + Assert(v.n_blocks() > 0, + ExcMessage("You cannot ask a block vector without blocks " + "for its MPI communicator.")); return v.block(0).get_mpi_communicator(); # endif } -- 2.39.5