]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make sure block vectors have blocks.
authorWolfgang Bangerth <bangerth@colostate.edu>
Thu, 20 Apr 2023 00:59:16 +0000 (18:59 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 20 Apr 2023 00:59:16 +0000 (18:59 -0600)
include/deal.II/sundials/n_vector.templates.h

index 535c2f41ac67ebec6f8fd5ae11bf97c97f3aeac4..696fc8c64bf5ecb5617b605b6140abe7d4b44de4 100644 (file)
@@ -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
       }

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.