From: Martin Kronbichler Date: Tue, 25 Aug 2009 11:00:37 +0000 (+0000) Subject: The method Jacobi_step now uses vmult and other pre-defined functions instead of... X-Git-Tag: v8.0.0~7232 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3811d59a04f8e08de0172a9dbfc57902d1d1ff9c;p=dealii.git The method Jacobi_step now uses vmult and other pre-defined functions instead of implementing the sweep by itselfs. This makes sure that the function gets parallelized by threads. git-svn-id: https://svn.dealii.org/trunk@19336 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/include/lac/sparse_matrix.templates.h b/deal.II/lac/include/lac/sparse_matrix.templates.h index 439aee252f..374f9173ee 100644 --- a/deal.II/lac/include/lac/sparse_matrix.templates.h +++ b/deal.II/lac/include/lac/sparse_matrix.templates.h @@ -1580,18 +1580,16 @@ SparseMatrix::Jacobi_step (Vector &v, GrowingVectorMemory > mem; typename VectorMemory >::Pointer w(mem); w->reinit(v); - - for (unsigned int row=0; rowrowstart[row]; jrowstart[row+1]; ++j) - { - s -= val[j] * v(cols->colnums[j]); - } - (*w)(row) = v(row) + s * om / val[cols->rowstart[row]]; + vmult (*w, v); + *w -= b; } - for (unsigned int row=0; rowequ (-1.,b); + precondition_Jacobi (*w, *w, om); + v -= *w; }