From: guido Date: Wed, 16 Apr 2003 16:38:10 +0000 (+0000) Subject: Advance iterator over empty rows X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47cd0fd2ecc75dc416cfbf805aca48ae20f24e25;p=dealii-svn.git Advance iterator over empty rows git-svn-id: https://svn.dealii.org/trunk@7403 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/include/lac/sparse_matrix_ez.h b/deal.II/lac/include/lac/sparse_matrix_ez.h index e501c8f2f4..0437a59ae7 100644 --- a/deal.II/lac/include/lac/sparse_matrix_ez.h +++ b/deal.II/lac/include/lac/sparse_matrix_ez.h @@ -1164,7 +1164,12 @@ SparseMatrixEZ::const_iterator::operator++ () if (accessor.a_index >= accessor.matrix->row_info[accessor.a_row].length) { accessor.a_index = 0; - accessor.a_row++; + do + { + ++accessor.a_row; + } + while (accessor.a_row < accessor.matrix->m() + && accessor.column() == SparseMatrixEZ::Entry::invalid); } return *this; }