]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
First piecewise removal support for PETSc < 3.x.
authoryoung <young@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 17 Aug 2012 12:22:59 +0000 (12:22 +0000)
committeryoung <young@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 17 Aug 2012 12:22:59 +0000 (12:22 +0000)
git-svn-id: https://svn.dealii.org/trunk@26005 0785d39b-7218-0410-832d-ea1e28bc413d

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

index a590d2e30af2864ffb60aa2a6dfcbb273cfa4f19..2df82399d2060b90fd170068603724aea65bcdc4 100644 (file)
@@ -337,11 +337,7 @@ namespace PETScWrappers
     AssertThrow (ierr == 0, ExcPETScError(ierr));
 
                                      // then set flags
-#if DEAL_II_PETSC_VERSION_LT(2,3,1)
-    PCICCSetLevels (pc, additional_data.levels);
-#else
     PCFactorSetLevels (pc, additional_data.levels);
-#endif
     AssertThrow (ierr == 0, ExcPETScError(ierr));
 
     ierr = PCSetFromOptions (pc);
@@ -386,11 +382,7 @@ namespace PETScWrappers
     AssertThrow (ierr == 0, ExcPETScError(ierr));
 
                                      // then set flags
-#if DEAL_II_PETSC_VERSION_LT(2,3,1)
-    PCILUSetLevels (pc, additional_data.levels);
-#else
     PCFactorSetLevels (pc, additional_data.levels);
-#endif
     AssertThrow (ierr == 0, ExcPETScError(ierr));
 
     ierr = PCSetFromOptions (pc);
@@ -529,26 +521,17 @@ namespace PETScWrappers
     AssertThrow (ierr == 0, ExcPETScError(ierr));
 
                                      // set flags as given
-#if DEAL_II_PETSC_VERSION_LT(2,3,1)
-    ierr = PCLUSetPivoting (pc, additional_data.pivoting);
-#elif DEAL_II_PETSC_VERSION_LT(3,0,1)
+#if DEAL_II_PETSC_VERSION_LT(3,0,1)
     ierr = PCFactorSetPivoting (pc, additional_data.pivoting);
 #else
     ierr = PCFactorSetColumnPivot (pc, additional_data.pivoting);
 #endif
     AssertThrow (ierr == 0, ExcPETScError(ierr));
 
-#if DEAL_II_PETSC_VERSION_LT(2,3,0)
-    ierr = PCLUSetZeroPivot (pc, additional_data.zero_pivot);
-#else
     ierr = PCFactorSetZeroPivot (pc, additional_data.zero_pivot);
-#endif
-
     AssertThrow (ierr == 0, ExcPETScError(ierr));
 
-#if DEAL_II_PETSC_VERSION_LT(2,3,0)
-    ierr = PCLUSetDamping (pc, additional_data.damping);
-#elif DEAL_II_PETSC_VERSION_LT(3,0,1)
+#if DEAL_II_PETSC_VERSION_LT(3,0,1)
     ierr = PCFactorSetShiftNonzero (pc, additional_data.damping);
 #else
     ierr = PCFactorSetShiftAmount (pc, additional_data.damping);
@@ -562,7 +545,6 @@ namespace PETScWrappers
     AssertThrow (ierr == 0, ExcPETScError(ierr));
   }
 
-
 }
 
 DEAL_II_NAMESPACE_CLOSE
index 8f30968d0d199db8195c6d834a92ac54d964d2da..4a81d5b204e3f10c55feeb884ebf6c58c869ea18 100644 (file)
@@ -21,9 +21,6 @@
 #  include <deal.II/lac/petsc_precondition.h>
 #  include <cmath>
 
-#if DEAL_II_PETSC_VERSION_LT(2,2,0)
-#include <petscsles.h>
-#endif
 #include <petscversion.h>
 
 DEAL_II_NAMESPACE_OPEN
@@ -41,13 +38,6 @@ namespace PETScWrappers
 #endif
 
     AssertThrow (ierr == 0, ExcPETScError(ierr));
-
-                                     // and destroy the solver object if we
-                                     // are in old PETSc mode
-#if DEAL_II_PETSC_VERSION_LT(2,2,0)
-    ierr = SLESDestroy (sles);
-    AssertThrow (ierr == 0, ExcPETScError(ierr));
-#endif
   }
 
 

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.