]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix katastrophic typo.
authoryoung <young@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 20 Aug 2012 18:32:08 +0000 (18:32 +0000)
committeryoung <young@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 20 Aug 2012 18:32:08 +0000 (18:32 +0000)
git-svn-id: https://svn.dealii.org/trunk@26037 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/lac/petsc_solver.cc

index 3aaef627b98f88b493c5521cb081a76ffbaad005..e577410a43b17cb13924733a37ea95814c0d6896 100644 (file)
@@ -264,11 +264,14 @@ namespace PETScWrappers
   void
   SolverChebychev::set_solver_type (KSP &ksp) const
   {
-                                     // set the type of solver. work around a
-                                     // problem in PETSc 2.1.6, where it asks
-                                     // for a char*, even though KSPXXXX is of
-                                     // type const char*
-    int ierr = KSPSetType (ksp, const_cast<char *>(KSPCHEBYSHEV));
+                                     // set the type of solver. 
+    int ierr;
+
+#ifdef DEAL_II_PETSC_VERSION_LT(3,3,0)
+    ierr = KSPSetType (ksp, const_cast<char *>(KSPCHEBYCHEV));
+#else
+    ierr = KSPSetType (ksp, const_cast<char *>(KSPCHEBYSHEV));
+#endif
     AssertThrow (ierr == 0, ExcPETScError(ierr));
 
                                      // in the deal.II solvers, we always

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.