From: fahad.alrashed Date: Sat, 5 Jul 2014 17:57:10 +0000 (+0000) Subject: Fixed a couple of call changes for PETSc 3.5.0 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e7047d131c437f8f4877cfb19a578fb113fd438;p=dealii-svn.git Fixed a couple of call changes for PETSc 3.5.0 git-svn-id: https://svn.dealii.org/trunk@33111 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/lac/petsc_precondition.cc b/deal.II/source/lac/petsc_precondition.cc index 8c466b0ba6..6d44b561a3 100644 --- a/deal.II/source/lac/petsc_precondition.cc +++ b/deal.II/source/lac/petsc_precondition.cc @@ -79,7 +79,11 @@ namespace PETScWrappers ierr = PCCreate(comm, &pc); AssertThrow (ierr == 0, ExcPETScError(ierr)); +#if DEAL_II_PETSC_VERSION_LT(3, 5, 0) ierr = PCSetOperators(pc , matrix, matrix, SAME_PRECONDITIONER); +#else + ierr = PCSetOperators(pc , matrix, matrix); +#endif AssertThrow (ierr == 0, ExcPETScError(ierr)); } diff --git a/deal.II/source/lac/petsc_solver.cc b/deal.II/source/lac/petsc_solver.cc index d9c95f30a4..80f71535c5 100644 --- a/deal.II/source/lac/petsc_solver.cc +++ b/deal.II/source/lac/petsc_solver.cc @@ -88,8 +88,12 @@ namespace PETScWrappers // last argument is irrelevant here, // since we use the solver only once // anyway +#if DEAL_II_PETSC_VERSION_LT(3, 5, 0) ierr = KSPSetOperators (solver_data->ksp, A, preconditioner, SAME_PRECONDITIONER); +#else + ierr = KSPSetOperators (solver_data->ksp, A, preconditioner); +#endif AssertThrow (ierr == 0, ExcPETScError(ierr)); // let derived classes set the solver