From d6f26d8b8a050ed424fa683cc4fec27d89e4349b Mon Sep 17 00:00:00 2001 From: wolf Date: Tue, 3 May 2005 03:43:30 +0000 Subject: [PATCH] Fix a stupid oversight. git-svn-id: https://svn.dealii.org/trunk@10607 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/include/lac/petsc_matrix_base.h | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) 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(); } -- 2.39.5