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);
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);
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);
AssertThrow (ierr == 0, ExcPETScError(ierr));
}
-
}
DEAL_II_NAMESPACE_CLOSE
# 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
#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
}