]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add assertion for row index in TrilinosWrappers::SparseMatrix::set/add
authorMartin Kronbichler <kronbichler.martin@gmail.com>
Mon, 1 Sep 2014 20:13:03 +0000 (22:13 +0200)
committerMartin Kronbichler <kronbichler.martin@gmail.com>
Tue, 2 Sep 2014 13:33:13 +0000 (15:33 +0200)
include/deal.II/lac/trilinos_sparse_matrix.h

index 5484aa62e6ec2d384322deb8db66db48c86bcb32..e284f56029031d91979a69ecedc17d8c73e69ad7 100644 (file)
@@ -2412,6 +2412,8 @@ namespace TrilinosWrappers
                      const TrilinosScalar *values,
                      const bool            elide_zero_values)
   {
+    AssertIndexRange(row, this->m());
+
     int ierr;
     if (last_action == Add)
       {
@@ -2641,6 +2643,7 @@ namespace TrilinosWrappers
                      const bool            elide_zero_values,
                      const bool            /*col_indices_are_sorted*/)
   {
+    AssertIndexRange(row, this->m());
     int ierr;
     if (last_action == Insert)
       {

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.