]> https://gitweb.dealii.org/ - dealii.git/commitdiff
add more tests for NaN
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Mon, 4 Mar 2013 13:13:24 +0000 (13:13 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Mon, 4 Mar 2013 13:13:24 +0000 (13:13 +0000)
git-svn-id: https://svn.dealii.org/trunk@28720 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/lac/full_matrix.templates.h
deal.II/include/deal.II/lac/relaxation_block.templates.h

index d7adfc766f90ff7d9e9bb49052119f23b098bf68..8a9a61b5b6a2204d4bbafd205b40b5e5dfa60c1e 100644 (file)
@@ -1,7 +1,7 @@
 //---------------------------------------------------------------------------
 //    $Id$
 //
-//    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 by the deal.II authors
+//    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -292,6 +292,7 @@ void FullMatrix<number>::forward (Vector<number2>       &dst,
       for (j=0; j<i; ++j)
         s -= number(dst(j)) * (*this)(i,j);
       dst(i) = s/(*this)(i,i);
+      Assert(numbers::is_finite(dst(i)), ExcNumberNotFinite());
     }
 }
 
@@ -312,6 +313,7 @@ void FullMatrix<number>::backward (Vector<number2>       &dst,
       for (j=i+1; j<nu; ++j)
         s -= dst(j) * number2((*this)(i,j));
       dst(i) = s/number2((*this)(i,i));
+      Assert(numbers::is_finite(dst(i)), ExcNumberNotFinite());
     }
 }
 
index 0d4f2f903aa2a2e424091a63fd4a646ee0500ac8..d326a6aac09262293ecf643ffaae835bc1f4115e 100644 (file)
@@ -1,7 +1,7 @@
 //---------------------------------------------------------------------------
 //    $Id$
 //
-//    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011, 2012 by the deal.II authors
+//    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011, 2012, 2013 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -215,6 +215,12 @@ RelaxationBlock<MATRIX,inverse_type>::do_step (
             }
           // Apply inverse diagonal
           this->inverse_vmult(block, x_cell, b_cell);
+#ifdef DEBUG
+         for (unsigned int i=0;i<x_cell.size();++i)
+           {
+             Assert(numbers::is_finite(x_cell(i)), ExcNumberNotFinite());
+           }
+#endif
           // Store in result vector
           row=additional_data->block_list.begin(block);
           for (unsigned int row_cell=0; row_cell<bs; ++row_cell, ++row)

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.