]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Small fix in collective add operation that does not crash when writing non-existing...
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Wed, 25 Nov 2009 16:46:01 +0000 (16:46 +0000)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Wed, 25 Nov 2009 16:46:01 +0000 (16:46 +0000)
git-svn-id: https://svn.dealii.org/trunk@20168 0785d39b-7218-0410-832d-ea1e28bc413d

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

index f59371ec4e69c5179a2d551f20a79d50821ac387..c225586c8144ae7a1da0b35c7a36acad54b3f275 100644 (file)
@@ -511,7 +511,7 @@ SparseMatrix<number>::add (const unsigned int  row,
                                   // the next present index in the sparsity
                                   // pattern (otherwise, do a binary
                                   // search)
-      if (index != next_row_index && my_cols[index] == col_indices[j])
+      if (index < next_row_index && my_cols[index] == col_indices[j])
        goto add_value;
 
       index = cols->operator()(row, col_indices[j]);

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.