From: wolf Date: Tue, 3 May 2005 03:43:30 +0000 (+0000) Subject: Fix a stupid oversight. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d6f26d8b8a050ed424fa683cc4fec27d89e4349b;p=dealii-svn.git Fix a stupid oversight. git-svn-id: https://svn.dealii.org/trunk@10607 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/include/lac/petsc_matrix_base.h b/deal.II/lac/include/lac/petsc_matrix_base.h index ace5bf7eff..e2e9bb5db7 100644 --- a/deal.II/lac/include/lac/petsc_matrix_base.h +++ b/deal.II/lac/include/lac/petsc_matrix_base.h @@ -851,15 +851,10 @@ namespace PETScWrappers accessor.a_index = 0; ++accessor.a_row; - while (accessor.a_index >= accessor.matrix->row_length(accessor.a_row)) - { - ++accessor.a_row; - - // if we happened to find the end - // of the matrix, then stop here - if (accessor.a_row == accessor.matrix->m()) - break; - } + while ((accessor.a_row < accessor.matrix->m()) + && + (accessor.matrix->row_length(accessor.a_row) == 0)) + ++accessor.a_row; accessor.visit_present_row(); }