]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Allow PETSc command line args to be passed to the preconditioner.
authorhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 27 Oct 2006 14:03:22 +0000 (14:03 +0000)
committerhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 27 Oct 2006 14:03:22 +0000 (14:03 +0000)
git-svn-id: https://svn.dealii.org/trunk@14101 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/source/petsc_precondition.cc

index 8ff083434cc2b39dc2a95285326114b5a6c8db88..cb7d45c5492894fa03a94c1b733c3451a782ec06 100644 (file)
@@ -61,6 +61,9 @@ namespace PETScWrappers
     int ierr;
     ierr = PCSetType (pc, const_cast<char *>(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<char *>(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));
   }
   
 

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.