Skip to main content
`Ctrl`+`K`

# KSPGetTolerances

Gets the relative, absolute, divergence, and maximum iteration tolerances used by the default `KSP` convergence tests.

## Synopsis

    #include "petscksp.h"
    #include "petscmat.h"
    PetscErrorCode KSPGetTolerances(KSP ksp, PeOp PetscReal *rtol, PeOp PetscReal *abstol, PeOp PetscReal *dtol, PeOp PetscInt *maxits)

Not Collective

## Input Parameter

- ksp - the Krylov subspace context

## Output Parameters

- rtol - the relative convergence tolerance

- abstol - the absolute convergence tolerance

- dtol - the divergence tolerance

- maxits - maximum number of iterations

## Note

The user can specify `NULL` for any parameter that is not needed.

## See Also

KSP: Linear System Solvers, `KSPSetTolerances()`, `KSP`, `KSPSetMinimumIterations()`, `KSPGetMinimumIterations()`

## Level

intermediate

## Location

src/ksp/ksp/interface/itfunc.c

## Examples

src/ksp/ksp/tutorials/ex1f.F90

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