]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Upgrade petsc solvers to petsc-dev
authorToby D. Young <tyoung@ippt.pan.pl>
Tue, 6 Sep 2011 08:25:06 +0000 (08:25 +0000)
committerToby D. Young <tyoung@ippt.pan.pl>
Tue, 6 Sep 2011 08:25:06 +0000 (08:25 +0000)
git-svn-id: https://svn.dealii.org/trunk@24259 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 172bf7a406086959de2ef1c8b4ac067065949cd2..a01bae67326f5d190f893afd3b22f289e29ab42d 100644 (file)
@@ -37,7 +37,11 @@ namespace PETScWrappers
   {
     if (pc!=NULL)
       {
+#if DEAL_II_PETSC_VERSION_DEV()
+       int ierr = PCDestroy(&pc);
+#else
        int ierr = PCDestroy(pc);
+#endif
        AssertThrow (ierr == 0, ExcPETScError(ierr));
       }
   }
index 825e441a6568c27591a16b925fdcd9e6a6dbc9c0..362967807fe3daa6e5ab3a91d6844ec88f39d46f 100644 (file)
@@ -34,7 +34,12 @@ namespace PETScWrappers
   SolverBase::SolverData::~SolverData ()
   {
                                      // destroy the solver object
+#if DEAL_II_PETSC_VERSION_DEV()
+    int ierr = KSPDestroy (&ksp);
+#else
     int ierr = KSPDestroy (ksp);
+#endif
+    
     AssertThrow (ierr == 0, ExcPETScError(ierr));
 
                                      // and destroy the solver object if we
@@ -397,7 +402,12 @@ namespace PETScWrappers
                                     // right
     if (additional_data.right_preconditioning)
       {
+#if DEAL_II_PETSC_VERSION_DEV()
+       ierr = KSPSetPCSide(ksp, PC_RIGHT);
+#else
        ierr = KSPSetPreconditionerSide(ksp, PC_RIGHT);
+#endif
+
        AssertThrow (ierr == 0, ExcPETScError(ierr));
       }
 

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.