Skip to main content
`Ctrl`+`K`

# KSPGMRESSetBreakdownTolerance

Sets the tolerance for determining divergence breakdown in `KSPGMRES` at restart.

## Synopsis

    #include "petscksp.h"
    PetscErrorCode KSPGMRESSetBreakdownTolerance(KSP ksp, PetscReal tol)

Logically Collective

## Input Parameters

- ksp - the Krylov space solver context

- tol - the tolerance

## Options Database Key

- -ksp_gmres_breakdown_tolerance <positive real value> - set tolerance for determining divergence breakdown

## Note

Divergence breakdown occurs when the norm of the GMRES residual increases significantly at a restart. This is defined to be \( | truenorm - gmresnorm | > tol * gmresnorm \) where \( gmresnorm \) is the norm computed by the GMRES process at a restart iteration using the standard GMRES recursion formula and \( truenorm \) is computed after the restart using the definition \( \| r \| = \| b - A x \|\).

Divergence breakdown stops the iterative solve with a `KSPConvergedReason` of `KSP_DIVERGED_BREAKDOWN` indicating the GMRES solver has not converged.

Divergence breakdown can occur when there is an error (bug) in either the application of the matrix or the preconditioner, or the preconditioner is extremely ill-conditioned.

The default is .1

## See Also

KSP: Linear System Solvers, `KSPGMRES`, `KSPSetTolerances()`, `KSPGMRESSetHapTol()`, `KSPConvergedReason`

## Level

intermediate

## Location

src/ksp/ksp/impls/gmres/gmres.c

## Implementations

KSPGMRESSetBreakdownTolerance_GMRES() in src/ksp/ksp/impls/gmres/gmres.c

Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages