:orphan: # 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, PetscReal *rtol, PetscReal *abstol, PetscReal *dtol, 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 ## Notes The user can specify `NULL` for any parameter that is not needed. maximum, iterations ## See Also [](ch_ksp), `KSPSetTolerances()`, `KSP` ## Level intermediate ## Location src/ksp/ksp/interface/itfunc.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ksp/ksp/interface/itfunc.c) [Index of all KSP routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)