From: Fabian Castelli Date: Wed, 6 Jul 2022 17:42:11 +0000 (+0200) Subject: Add AssertIndexRange X-Git-Tag: v9.5.0-rc1~1105^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F14102%2Fhead;p=dealii.git Add AssertIndexRange --- diff --git a/include/deal.II/matrix_free/operators.h b/include/deal.II/matrix_free/operators.h index 339e651b18..771fa19713 100644 --- a/include/deal.II/matrix_free/operators.h +++ b/include/deal.II/matrix_free/operators.h @@ -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); }