From: young Date: Tue, 31 Mar 2009 13:11:25 +0000 (+0000) Subject: Upgraded: PETSc solvers to migrate to PETSc 3.0.0 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a6e2dc589faf7c5faa50f2c1f5a8cad21e7f9c9;p=dealii-svn.git Upgraded: PETSc solvers to migrate to PETSc 3.0.0 git-svn-id: https://svn.dealii.org/trunk@18531 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/include/lac/petsc_solver.h b/deal.II/lac/include/lac/petsc_solver.h index 0f51cedd21..742582aca5 100644 --- a/deal.II/lac/include/lac/petsc_solver.h +++ b/deal.II/lac/include/lac/petsc_solver.h @@ -668,8 +668,6 @@ namespace PETScWrappers virtual void set_solver_type (KSP &ksp) const; }; - - /** * An implementation of the solver interface using the PETSc CG Squared * solver. diff --git a/deal.II/lac/source/petsc_solver.cc b/deal.II/lac/source/petsc_solver.cc index beaf53fa9f..907837d42a 100644 --- a/deal.II/lac/source/petsc_solver.cc +++ b/deal.II/lac/source/petsc_solver.cc @@ -163,8 +163,15 @@ namespace PETScWrappers // checks with the solver_control // object we have in this object for // convergence +#if (PETSC_VERSION_MAJOR <= 2) KSPSetConvergenceTest (solver_data->ksp, &convergence_test, reinterpret_cast(&solver_control)); +#else + KSPSetConvergenceTest (solver_data->ksp, &convergence_test, + reinterpret_cast(&solver_control), + PETSC_NULL); +#endif + } // then do the real work: set up solver @@ -253,7 +260,6 @@ namespace PETScWrappers /* ---------------------- SolverRichardson ------------------------ */ - SolverRichardson::AdditionalData:: AdditionalData (const double omega) : @@ -446,7 +452,7 @@ namespace PETScWrappers AssertThrow (ierr == 0, ExcPETScError(ierr)); */ // so rather expand their macros by hand, - // and do some equally nast stuff that at + // and do some equally nasty stuff that at // least doesn't yield warnings... int (*fun_ptr)(KSP,int); ierr = PetscObjectQueryFunction((PetscObject)(ksp),