From 47b571de64267dd59c06b4af559893263ea12b2a Mon Sep 17 00:00:00 2001 From: hartmann Date: Fri, 27 Oct 2006 14:03:22 +0000 Subject: [PATCH] Allow PETSc command line args to be passed to the preconditioner. git-svn-id: https://svn.dealii.org/trunk@14101 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/source/petsc_precondition.cc | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/deal.II/lac/source/petsc_precondition.cc b/deal.II/lac/source/petsc_precondition.cc index 8ff083434c..cb7d45c549 100644 --- a/deal.II/lac/source/petsc_precondition.cc +++ b/deal.II/lac/source/petsc_precondition.cc @@ -61,6 +61,9 @@ namespace PETScWrappers int ierr; ierr = PCSetType (pc, const_cast(PCJACOBI)); AssertThrow (ierr == 0, ExcPETScError(ierr)); + + ierr = PCSetFromOptions (pc); + AssertThrow (ierr == 0, ExcPETScError(ierr)); } @@ -84,6 +87,9 @@ namespace PETScWrappers int ierr; ierr = PCSetType (pc, const_cast(PCBJACOBI)); AssertThrow (ierr == 0, ExcPETScError(ierr)); + + ierr = PCSetFromOptions (pc); + AssertThrow (ierr == 0, ExcPETScError(ierr)); } @@ -117,6 +123,9 @@ namespace PETScWrappers // then set flags as given ierr = PCSORSetOmega (pc, additional_data.omega); AssertThrow (ierr == 0, ExcPETScError(ierr)); + + ierr = PCSetFromOptions (pc); + AssertThrow (ierr == 0, ExcPETScError(ierr)); } @@ -154,6 +163,9 @@ namespace PETScWrappers // convert SOR to SSOR ierr = PCSORSetSymmetric (pc, SOR_SYMMETRIC_SWEEP); AssertThrow (ierr == 0, ExcPETScError(ierr)); + + ierr = PCSetFromOptions (pc); + AssertThrow (ierr == 0, ExcPETScError(ierr)); } @@ -187,6 +199,9 @@ namespace PETScWrappers // then set flags as given ierr = PCEisenstatSetOmega (pc, additional_data.omega); AssertThrow (ierr == 0, ExcPETScError(ierr)); + + ierr = PCSetFromOptions (pc); + AssertThrow (ierr == 0, ExcPETScError(ierr)); } @@ -225,6 +240,9 @@ namespace PETScWrappers PCICCSetLevels (pc, additional_data.levels); #endif AssertThrow (ierr == 0, ExcPETScError(ierr)); + + ierr = PCSetFromOptions (pc); + AssertThrow (ierr == 0, ExcPETScError(ierr)); } @@ -262,6 +280,9 @@ namespace PETScWrappers PCILUSetLevels (pc, additional_data.levels); #endif AssertThrow (ierr == 0, ExcPETScError(ierr)); + + ierr = PCSetFromOptions (pc); + AssertThrow (ierr == 0, ExcPETScError(ierr)); } @@ -318,6 +339,9 @@ namespace PETScWrappers ierr = PCFactorSetShiftNonzero (pc, additional_data.damping); #endif AssertThrow (ierr == 0, ExcPETScError(ierr)); + + ierr = PCSetFromOptions (pc); + AssertThrow (ierr == 0, ExcPETScError(ierr)); } -- 2.39.5