From ae351786693466119169224463304312830cd545 Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Thu, 3 Mar 2011 17:16:40 +0000 Subject: [PATCH] fix PETSc stuff introduced by me the other day with version < 3 git-svn-id: https://svn.dealii.org/trunk@23459 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/source/lac/petsc_parallel_sparse_matrix.cc | 5 ++++- deal.II/source/lac/petsc_sparse_matrix.cc | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/deal.II/source/lac/petsc_parallel_sparse_matrix.cc b/deal.II/source/lac/petsc_parallel_sparse_matrix.cc index e5287a1698..f16739d89a 100644 --- a/deal.II/source/lac/petsc_parallel_sparse_matrix.cc +++ b/deal.II/source/lac/petsc_parallel_sparse_matrix.cc @@ -557,7 +557,10 @@ namespace PETScWrappers // MatZeroRows(). Otherwise one can // not write into that row // afterwards. -#if DEAL_II_PETSC_VERSION_LT(3,1,0) +#if DEAL_II_PETSC_VERSION_LT(3,0,0) + ierr = MatSetOption (matrix, MAT_KEEP_ZEROED_ROWS); + AssertThrow (ierr == 0, ExcPETScError(ierr)); +#elif DEAL_II_PETSC_VERSION_LT(3,1,0) ierr = MatSetOption (matrix, MAT_KEEP_ZEROED_ROWS, PETSC_TRUE); AssertThrow (ierr == 0, ExcPETScError(ierr)); #else diff --git a/deal.II/source/lac/petsc_sparse_matrix.cc b/deal.II/source/lac/petsc_sparse_matrix.cc index 5b06c323f4..19379aa04f 100644 --- a/deal.II/source/lac/petsc_sparse_matrix.cc +++ b/deal.II/source/lac/petsc_sparse_matrix.cc @@ -293,7 +293,10 @@ namespace PETScWrappers // MatZeroRows(). Otherwise one can // not write into that row // afterwards. -#if DEAL_II_PETSC_VERSION_LT(3,1,0) +#if DEAL_II_PETSC_VERSION_LT(3,0,0) + ierr = MatSetOption (matrix, MAT_KEEP_ZEROED_ROWS); + AssertThrow (ierr == 0, ExcPETScError(ierr)); +#elif DEAL_II_PETSC_VERSION_LT(3,1,0) ierr = MatSetOption (matrix, MAT_KEEP_ZEROED_ROWS, PETSC_TRUE); AssertThrow (ierr == 0, ExcPETScError(ierr)); #else -- 2.39.5