From b396672b372c5cf3bf18abc065f954b9e9842dca Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Wed, 25 Feb 2015 08:56:22 -0500 Subject: [PATCH] fix SparseMIC 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 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 (); -- 2.39.5