]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fixed a couple of call changes for PETSc 3.5.0
authorfahad.alrashed <fahad.alrashed@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 5 Jul 2014 17:57:10 +0000 (17:57 +0000)
committerfahad.alrashed <fahad.alrashed@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 5 Jul 2014 17:57:10 +0000 (17:57 +0000)
git-svn-id: https://svn.dealii.org/trunk@33111 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/lac/petsc_precondition.cc
deal.II/source/lac/petsc_solver.cc

index 8c466b0ba6a9c9b3242f4bc4971a5116aa4ddbf8..6d44b561a389ca86fd86d0199070d42d2fa23a6d 100644 (file)
@@ -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));
   }
 
index d9c95f30a4c442a2f63430458006669a0d874ba6..80f71535c5f99c6798d25668f0fbdb442b65d1aa 100644 (file)
@@ -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

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.