From 0d46eff94eb0b92dd068090473dcee2f25d8fcff Mon Sep 17 00:00:00 2001 From: prill Date: Tue, 22 May 2007 10:05:55 +0000 Subject: [PATCH] SolverControl fix for PETSc Richardson method. git-svn-id: https://svn.dealii.org/trunk@14686 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/source/petsc_solver.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/deal.II/lac/source/petsc_solver.cc b/deal.II/lac/source/petsc_solver.cc index 59d2f97d71..36102d81e0 100644 --- a/deal.II/lac/source/petsc_solver.cc +++ b/deal.II/lac/source/petsc_solver.cc @@ -290,6 +290,22 @@ namespace PETScWrappers // honor the initial guess in the // solution vector. do so here as well: KSPSetInitialGuessNonzero (ksp, PETSC_TRUE); + + // Hand over the absolute + // tolerance and the maximum + // iteration number to the PETSc + // convergence criterion. The + // custom deal.II SolverControl + // object is ignored by the PETSc + // Richardson method (when no + // PETSc monitoring is present), + // since in this case PETSc + // uses a faster version of + // the Richardson iteration, + // where no residual is + // available. + KSPSetTolerances(ksp, PETSC_DEFAULT, this->solver_control.tolerance(), + PETSC_DEFAULT, this->solver_control.max_steps()); } -- 2.39.5