]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Catch adding NaN into a Trilinos SparseMatrix in all cases (in debug mode).
authorTimo Heister <timo.heister@gmail.com>
Thu, 25 Oct 2012 14:10:42 +0000 (14:10 +0000)
committerTimo Heister <timo.heister@gmail.com>
Thu, 25 Oct 2012 14:10:42 +0000 (14:10 +0000)
git-svn-id: https://svn.dealii.org/trunk@27201 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/lac/trilinos_sparse_matrix.h

index dad014f8ac5c3303b285d51b1a23eb7d7db3c26b..6cae9dc4458b3065a2a37ee7a7445a67331887e3 100644 (file)
@@ -2957,6 +2957,10 @@ namespace TrilinosWrappers
         col_index_ptr = (int*)col_indices;
         col_value_ptr = values;
         n_columns = n_cols;
+#ifdef DEBUG
+        for (unsigned int j=0; j<n_cols; ++j)
+            Assert (numbers::is_finite(values[j]), ExcNumberNotFinite());
+#endif
       }
     else
       {

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.