]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix something that is almost certainly a bug.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 18 Jan 2013 04:48:07 +0000 (04:48 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 18 Jan 2013 04:48:07 +0000 (04:48 +0000)
git-svn-id: https://svn.dealii.org/trunk@28117 0785d39b-7218-0410-832d-ea1e28bc413d

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

index bba1e30f6b497d542b3aed4d7915568f73393671..7fc1028b536fac8524b7000d5c1199dc387499b4 100644 (file)
@@ -140,14 +140,13 @@ void SparseMIC<number>::decompose (const SparseMatrix<somenumber> &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<somenumber>::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;

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.