]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use a collective set function.
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Wed, 29 Apr 2009 16:33:07 +0000 (16:33 +0000)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Wed, 29 Apr 2009 16:33:07 +0000 (16:33 +0000)
git-svn-id: https://svn.dealii.org/trunk@18792 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 3d58ed0ae97e65a0f8f4ed23bb2d937f580175f8..9ed89e7ecd3329d596064dfd17229cac676298e0 100644 (file)
@@ -204,9 +204,9 @@ SparseLUDecomposition<number>::copy_from (const SparseMatrix<somenumber>& matrix
     = matrix.get_sparsity_pattern().get_column_numbers();
 
   for (unsigned int row=0; row<this->m(); ++row)
-    for (const unsigned int * col = &column_numbers[rowstart_indices[row]];
-         col != &column_numbers[rowstart_indices[row+1]]; ++col)
-      this->set (row, *col, matrix.global_entry(col-column_numbers));
+    this->set (row, rowstart_indices[row+1]-rowstart_indices[row],
+              &column_numbers[rowstart_indices[row]],
+              &matrix.val[rowstart_indices[row]], false);
 }
 
 

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.