From f36a281f489035b3d0437f3e8171fa13753da6bb Mon Sep 17 00:00:00 2001 From: Fahad Alrashed Date: Sat, 5 Jul 2014 17:57:10 +0000 Subject: [PATCH] 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 --- deal.II/source/lac/petsc_precondition.cc | 4 ++++ deal.II/source/lac/petsc_solver.cc | 4 ++++ 2 files changed, 8 insertions(+) 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 -- 2.39.5