]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Added support for PETSc 2.3.1 (16).
authorprill <prill@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 4 Aug 2006 08:55:11 +0000 (08:55 +0000)
committerprill <prill@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 4 Aug 2006 08:55:11 +0000 (08:55 +0000)
git-svn-id: https://svn.dealii.org/trunk@13593 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/source/petsc_precondition.cc
deal.II/lac/source/petsc_solver.cc

index 6bb1d6f6996af4dc7268ddae3e948cefdd053c7a..ed3705cd70a4da6de5dba21304c71ba1d32866ee 100644 (file)
@@ -218,7 +218,11 @@ 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
     PCICCSetLevels (pc, additional_data.levels);
+#endif
     AssertThrow (ierr == 0, ExcPETScError(ierr));
   }
   
@@ -251,7 +255,11 @@ namespace PETScWrappers
     AssertThrow (ierr == 0, ExcPETScError(ierr));
 
                                      // then set flags
-    PCILUSetLevels (pc, additional_data.levels);
+#if (PETSC_VERSION_MAJOR == 2) && (PETSC_VERSION_MINOR == 3) && (PETSC_VERSION_SUBMINOR == 1)
+    PCFactorSetLevels (pc, additional_data.levels);
+#else
+    PCILUSetLevels (pc, additional_data.levels);  
+#endif
     AssertThrow (ierr == 0, ExcPETScError(ierr));
   }
   
@@ -288,7 +296,11 @@ namespace PETScWrappers
     AssertThrow (ierr == 0, ExcPETScError(ierr));
 
                                      // 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);
+#endif
     AssertThrow (ierr == 0, ExcPETScError(ierr));
 
 #if (PETSC_VERSION_MAJOR <= 2) && (PETSC_VERSION_MINOR < 3)
index 1b77edbc13b4e6dbc2503d7283df59a8ae280a64..cd8295b75b9927ce6436d07398175b229c200950 100644 (file)
@@ -434,7 +434,7 @@ namespace PETScWrappers
     int (*fun_ptr)(KSP,int); 
     ierr = PetscObjectQueryFunction((PetscObject)(ksp),
                                     "KSPGMRESSetRestart_C",
-                                    (PetscVoidFunction)&fun_ptr);
+                                    (void (**)())&fun_ptr);
     AssertThrow (ierr == 0, ExcPETScError(ierr));
 
     ierr = (*fun_ptr)(ksp,additional_data.restart_parameter);

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.