From: young Date: Fri, 17 Aug 2012 12:22:59 +0000 (+0000) Subject: First piecewise removal support for PETSc < 3.x. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4fe5f37fce9b0c7fba520bd1c915b007a2fd6764;p=dealii-svn.git First piecewise removal support for PETSc < 3.x. git-svn-id: https://svn.dealii.org/trunk@26005 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/lac/petsc_precondition.cc b/deal.II/source/lac/petsc_precondition.cc index a590d2e30a..2df82399d2 100644 --- a/deal.II/source/lac/petsc_precondition.cc +++ b/deal.II/source/lac/petsc_precondition.cc @@ -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 diff --git a/deal.II/source/lac/petsc_solver.cc b/deal.II/source/lac/petsc_solver.cc index 8f30968d0d..4a81d5b204 100644 --- a/deal.II/source/lac/petsc_solver.cc +++ b/deal.II/source/lac/petsc_solver.cc @@ -21,9 +21,6 @@ # include # include -#if DEAL_II_PETSC_VERSION_LT(2,2,0) -#include -#endif #include 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 }