From: Timo Heister Date: Wed, 25 Feb 2015 13:56:22 +0000 (-0500) Subject: fix SparseMIC X-Git-Tag: v8.3.0-rc1~417^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b396672b372c5cf3bf18abc065f954b9e9842dca;p=dealii.git fix SparseMIC We need to initialize the decomposition before we can look at this->m() and this->n(). Bug got introduced in 27b50d8. --- diff --git a/include/deal.II/lac/sparse_mic.templates.h b/include/deal.II/lac/sparse_mic.templates.h index b097ab64e5..fb47824243 100644 --- a/include/deal.II/lac/sparse_mic.templates.h +++ b/include/deal.II/lac/sparse_mic.templates.h @@ -67,17 +67,16 @@ void SparseMIC::initialize (const SparseMatrix &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::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 ();