]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Avoid a silly use of SparseMatrix::global_entry.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 15 Jan 2013 03:00:39 +0000 (03:00 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 15 Jan 2013 03:00:39 +0000 (03:00 +0000)
git-svn-id: https://svn.dealii.org/trunk@28058 0785d39b-7218-0410-832d-ea1e28bc413d

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

index b196265526e0e31adf232bc3b1c21aae78b7ea64..38059028e67c294c5a64b153afd39502c8e798bd 100644 (file)
@@ -198,10 +198,9 @@ SparseLUDecomposition<number>::copy_from (const SparseMatrix<somenumber> &matrix
       return;
     }
 
-  // preset the elements
-  std::fill_n (&this->global_entry(0),
-               this->n_nonzero_elements(),
-               0);
+  // preset the elements by zero. this needs to be written in a slightly
+  // awkward way so that we find the corresponding function in the base class.
+  SparseMatrix<number>::operator= (number(0));
 
   // note: pointers to the sparsity
   // pattern of the old matrix!

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.