]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
new structure
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 3 Dec 2003 13:30:58 +0000 (13:30 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 3 Dec 2003 13:30:58 +0000 (13:30 +0000)
git-svn-id: https://svn.dealii.org/trunk@8227 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 7aedbe586785664c000255d56cd88f455b58d810..10660b7cdd4e40b961309065ee30b82185db25a9 100644 (file)
@@ -195,7 +195,9 @@ SparseMatrix<number>::symmetrize ()
   for (unsigned int row=0; row<n_rows; ++row)
     {
                                       // first skip diagonal entry
-      number             *val_ptr = &val[cols->rowstart[row]+1];
+      number             *val_ptr = &val[cols->rowstart[row]];
+      if (cols->optimize_diagonal())
+         ++val_ptr;
       const unsigned int *colnum_ptr = &cols->colnums[cols->rowstart[row]+1];      
       const number       *const val_end_of_row = &val[cols->rowstart[row+1]];
 

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.