From 00f4902956a9c95f27829efa0429eafa3dfcf019 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Wed, 25 Nov 2009 16:46:01 +0000 Subject: [PATCH] Small fix in collective add operation that does not crash when writing non-existing entries. git-svn-id: https://svn.dealii.org/trunk@20168 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/include/lac/sparse_matrix.templates.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deal.II/lac/include/lac/sparse_matrix.templates.h b/deal.II/lac/include/lac/sparse_matrix.templates.h index f59371ec4e..c225586c81 100644 --- a/deal.II/lac/include/lac/sparse_matrix.templates.h +++ b/deal.II/lac/include/lac/sparse_matrix.templates.h @@ -511,7 +511,7 @@ SparseMatrix::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]); -- 2.39.5