From: heister Date: Thu, 3 Mar 2011 17:16:40 +0000 (+0000) Subject: fix PETSc stuff introduced by me the other day with version < 3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78b7b947774494f0ee3e83b6beea74365188f1f2;p=dealii-svn.git 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 --- 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