From be2ecb02c3a471ca2dd640b9dd76b08fa52159c8 Mon Sep 17 00:00:00 2001 From: young Date: Mon, 20 Aug 2012 18:32:08 +0000 Subject: [PATCH] Fix katastrophic typo. git-svn-id: https://svn.dealii.org/trunk@26037 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/source/lac/petsc_solver.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/deal.II/source/lac/petsc_solver.cc b/deal.II/source/lac/petsc_solver.cc index 3aaef627b9..e577410a43 100644 --- a/deal.II/source/lac/petsc_solver.cc +++ b/deal.II/source/lac/petsc_solver.cc @@ -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(KSPCHEBYSHEV)); + // set the type of solver. + int ierr; + +#ifdef DEAL_II_PETSC_VERSION_LT(3,3,0) + ierr = KSPSetType (ksp, const_cast(KSPCHEBYCHEV)); +#else + ierr = KSPSetType (ksp, const_cast(KSPCHEBYSHEV)); +#endif AssertThrow (ierr == 0, ExcPETScError(ierr)); // in the deal.II solvers, we always -- 2.39.5