]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Advance iterator over empty rows
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 16 Apr 2003 16:38:10 +0000 (16:38 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 16 Apr 2003 16:38:10 +0000 (16:38 +0000)
git-svn-id: https://svn.dealii.org/trunk@7403 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/sparse_matrix_ez.h

index e501c8f2f4cb75c4b19cde931f53079c3e21b43f..0437a59ae7d8ef1c6b7557084354286392dbbf1d 100644 (file)
@@ -1164,7 +1164,12 @@ SparseMatrixEZ<number>::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<number>::Entry::invalid);
     }
   return *this;
 }

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.