]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add AssertIndexRange 14102/head
authorFabian Castelli <fabian.castelli@kit.edu>
Wed, 6 Jul 2022 17:42:11 +0000 (19:42 +0200)
committerFabian Castelli <fabian.castelli@kit.edu>
Wed, 6 Jul 2022 17:42:11 +0000 (19:42 +0200)
include/deal.II/matrix_free/operators.h

index 339e651b18a82a5db83a9d06caced9ef4a02b1e5..771fa19713daf91caa35351979bce20d6a9b6ec0 100644 (file)
@@ -65,6 +65,7 @@ namespace MatrixFreeOperators
                             typename VectorType::BlockType &>::type
     subblock(VectorType &vector, unsigned int block_no)
     {
+      AssertIndexRange(block_no, vector.n_blocks());
       return vector.block(block_no);
     }
 

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.