]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Upgraded: PETSc precondition to migrate to PETSc 3.0.0
authoryoung <young@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 31 Mar 2009 13:15:00 +0000 (13:15 +0000)
committeryoung <young@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 31 Mar 2009 13:15:00 +0000 (13:15 +0000)
git-svn-id: https://svn.dealii.org/trunk@18536 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/source/petsc_precondition.cc

index 9219d5cc269f508ba136cc08ba031c991987d109..e07324115559a0f727f7833e6b003c5440e15606 100644 (file)
@@ -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);

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.