From: wolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Date: Wed, 10 Aug 2005 14:25:02 +0000 (+0000)
Subject: Hopefully make this compile with petsc 2.3.0 as well...
X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50b7827d59eddf71b2862f0b0b11fbe27228ad14;p=dealii-svn.git

Hopefully make this compile with petsc 2.3.0 as well...


git-svn-id: https://svn.dealii.org/trunk@11273 0785d39b-7218-0410-832d-ea1e28bc413d
---

diff --git a/deal.II/lac/source/petsc_matrix_base.cc b/deal.II/lac/source/petsc_matrix_base.cc
index 888e7c398d..7902e84627 100644
--- a/deal.II/lac/source/petsc_matrix_base.cc
+++ b/deal.II/lac/source/petsc_matrix_base.cc
@@ -215,8 +215,13 @@ namespace PETScWrappers
     ISCreateGeneral (get_mpi_communicator(), 1, &petsc_row, &index_set);
     
     static const PetscScalar zero = 0;
+#if (PETSC_VERSION_MAJOR <= 2) && (PETSC_VERSION_MINOR <= 2)
     const int ierr
       = MatZeroRows(matrix, index_set, &zero);
+#else
+    const int ierr
+      = MatZeroRowsIS(matrix, index_set, &zero);
+#endif
     
     AssertThrow (ierr == 0, ExcPETScError(ierr));
 
@@ -248,8 +253,13 @@ namespace PETScWrappers
                      &petsc_rows[0], &index_set);
     
     static const PetscScalar zero = 0;
+#if (PETSC_VERSION_MAJOR <= 2) && (PETSC_VERSION_MINOR <= 2)
     const int ierr
       = MatZeroRows(matrix, index_set, &zero);
+#else
+    const int ierr
+      = MatZeroRowsIS(matrix, index_set, &zero);
+#endif
     
     AssertThrow (ierr == 0, ExcPETScError(ierr));