From f2bb82b29f1bfb5c8414eff66248276d9df5580a Mon Sep 17 00:00:00 2001 From: young Date: Tue, 31 Mar 2009 13:15:00 +0000 Subject: [PATCH] Upgraded: PETSc precondition to migrate to PETSc 3.0.0 git-svn-id: https://svn.dealii.org/trunk@18536 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/source/petsc_precondition.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/deal.II/lac/source/petsc_precondition.cc b/deal.II/lac/source/petsc_precondition.cc index 9219d5cc26..e073241155 100644 --- a/deal.II/lac/source/petsc_precondition.cc +++ b/deal.II/lac/source/petsc_precondition.cc @@ -234,10 +234,10 @@ namespace PETScWrappers AssertThrow (ierr == 0, ExcPETScError(ierr)); // then set flags -#if (PETSC_VERSION_MAJOR >= 2) && (PETSC_VERSION_MINOR >= 3) && (PETSC_VERSION_SUBMINOR >= 1) - PCFactorSetLevels (pc, additional_data.levels); -#else +#if (PETSC_VERSION_MAJOR >= 2) && (PETSC_VERSION_MINOR < 3) && (PETSC_VERSION_SUBMINOR < 1) PCICCSetLevels (pc, additional_data.levels); +#else + PCFactorSetLevels (pc, additional_data.levels); #endif AssertThrow (ierr == 0, ExcPETScError(ierr)); @@ -274,10 +274,10 @@ namespace PETScWrappers AssertThrow (ierr == 0, ExcPETScError(ierr)); // then set flags -#if (PETSC_VERSION_MAJOR >= 2) && (PETSC_VERSION_MINOR >= 3) && (PETSC_VERSION_SUBMINOR >= 1) - PCFactorSetLevels (pc, additional_data.levels); -#else +#if (PETSC_VERSION_MAJOR >= 2) && (PETSC_VERSION_MINOR < 3) && (PETSC_VERSION_SUBMINOR < 1) PCILUSetLevels (pc, additional_data.levels); +#else + PCFactorSetLevels (pc, additional_data.levels); #endif AssertThrow (ierr == 0, ExcPETScError(ierr)); @@ -319,13 +319,13 @@ namespace PETScWrappers // set flags as given #if (PETSC_VERSION_MAJOR >= 2) && (PETSC_VERSION_MINOR >= 3) && (PETSC_VERSION_SUBMINOR >= 1) - ierr = PCFactorSetPivoting (pc, additional_data.pivoting); -#else ierr = PCLUSetPivoting (pc, additional_data.pivoting); +#else + ierr = PCFactorSetPivoting (pc, additional_data.pivoting); #endif AssertThrow (ierr == 0, ExcPETScError(ierr)); -#if (PETSC_VERSION_MAJOR <= 2) && (PETSC_VERSION_MINOR < 3) +#if (PETSC_VERSION_MAJOR >= 2) && (PETSC_VERSION_MINOR < 3) ierr = PCLUSetZeroPivot (pc, additional_data.zero_pivot); #else ierr = PCFactorSetZeroPivot (pc, additional_data.zero_pivot); @@ -333,7 +333,7 @@ namespace PETScWrappers AssertThrow (ierr == 0, ExcPETScError(ierr)); -#if (PETSC_VERSION_MAJOR <= 2) && (PETSC_VERSION_MINOR < 3) +#if (PETSC_VERSION_MAJOR >= 2) && (PETSC_VERSION_MINOR < 3) ierr = PCLUSetDamping (pc, additional_data.damping); #else ierr = PCFactorSetShiftNonzero (pc, additional_data.damping); -- 2.39.5