]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Exception if a block entered is outside the matrix
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 17 Apr 2002 14:14:12 +0000 (14:14 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 17 Apr 2002 14:14:12 +0000 (14:14 +0000)
git-svn-id: https://svn.dealii.org/trunk@5675 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/block_matrix_array.h

index b04f15bd37284e3bbbdb46706b246bfa1fbd9619..49d0551ee481826971ba3fc9bc8554ac66d050ec 100644 (file)
@@ -354,6 +354,8 @@ BlockMatrixArray<MATRIX>::enter (const MATRIX& matrix,
                                 unsigned row, unsigned int col,
                                 double prefix, bool transpose)
 {
+  Assert(row<n_block_rows(), ExcIndexRange(row, 0, n_block_rows()));
+  Assert(col<n_block_cols(), ExcIndexRange(col, 0, n_block_cols()));
   entries.push_back(Entry(matrix, row, col, prefix, transpose));
 }
 

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.