]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix SparseMIC 602/head
authorTimo Heister <timo.heister@gmail.com>
Wed, 25 Feb 2015 13:56:22 +0000 (08:56 -0500)
committerTimo Heister <timo.heister@gmail.com>
Wed, 25 Feb 2015 13:56:22 +0000 (08:56 -0500)
We need to initialize the decomposition before we can look at this->m()
and this->n(). Bug got introduced in 27b50d8.

include/deal.II/lac/sparse_mic.templates.h

index b097ab64e5155e3d57db4d6f70e75ee7805fecad..fb478242438e5d55f98a59163fbbdad646a8574a 100644 (file)
@@ -67,17 +67,16 @@ void SparseMIC<number>::initialize (const SparseMatrix<somenumber> &matrix,
                                     const AdditionalData &data)
 {
   Assert (matrix.m()==matrix.n(), ExcNotQuadratic ());
-  Assert (this->m()==this->n(),   ExcNotQuadratic ());
-  Assert (matrix.m()==this->m(),  ExcDimensionMismatch(matrix.m(), this->m()));
-
   Assert (data.strengthen_diagonal>=0, ExcInvalidStrengthening (data.strengthen_diagonal));
 
   SparseLUDecomposition<number>::initialize(matrix, data);
-
   this->strengthen_diagonal = data.strengthen_diagonal;
   this->prebuild_lower_bound ();
   this->copy_from (matrix);
 
+  Assert (this->m()==this->n(),   ExcNotQuadratic ());
+  Assert (matrix.m()==this->m(),  ExcDimensionMismatch(matrix.m(), this->m()));
+
   if (data.strengthen_diagonal > 0)
     this->strengthen_diagonal_impl ();
 

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.