From: bangerth Date: Fri, 18 Jan 2013 04:48:07 +0000 (+0000) Subject: Fix something that is almost certainly a bug. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e68ce248e27addb15d7f6f860a9a63d63073d00;p=dealii-svn.git Fix something that is almost certainly a bug. git-svn-id: https://svn.dealii.org/trunk@28117 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/lac/sparse_mic.templates.h b/deal.II/include/deal.II/lac/sparse_mic.templates.h index bba1e30f6b..7fc1028b53 100644 --- a/deal.II/include/deal.II/lac/sparse_mic.templates.h +++ b/deal.II/include/deal.II/lac/sparse_mic.templates.h @@ -140,14 +140,13 @@ void SparseMIC::decompose (const SparseMatrix &matrix, const number temp = this->diag_element(row); number temp1 = 0; - unsigned int k = 0; // work on the lower left part of the matrix. we know // it's symmetric, so we can work with this alone for (typename SparseMatrix::const_iterator p = matrix.begin(row)+1; (p != matrix.end(row)) && (p->column() < p->row()); - ++p, ++k) - temp1 += p->value() / diag[k] * inner_sums[k]; + ++p) + temp1 += p->value() / diag[p->column()] * inner_sums[p->column()]; Assert(temp-temp1 > 0, ExcStrengthenDiagonalTooSmall()); diag[row] = temp - temp1;