]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add an assert on row index in SparseMatrix::add(..) 9484/head
authorSimon Sticko <simon@sticko.se>
Thu, 6 Feb 2020 08:32:32 +0000 (09:32 +0100)
committerSimon Sticko <simon@sticko.se>
Thu, 6 Feb 2020 08:32:32 +0000 (09:32 +0100)
include/deal.II/lac/sparse_matrix.templates.h

index 1e81b55c1687add2f11026947e9cd4d63436acc7..b5e6f925ac5d057c814b966aba5213da5904dbdb 100644 (file)
@@ -541,6 +541,7 @@ SparseMatrix<number>::add(const size_type  row,
                           const bool       col_indices_are_sorted)
 {
   Assert(cols != nullptr, ExcNotInitialized());
+  AssertIndexRange(row, m());
 
   // if we have sufficiently many columns
   // and sorted indices it is faster to

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.