:orphan: # KSPConvergedDefaultSetConvergedMaxits allows the default convergence test to declare convergence and return `KSP_CONVERGED_ITS` if the maximum number of iterations is reached ## Synopsis ``` #include "petscksp.h" PetscErrorCode KSPConvergedDefaultSetConvergedMaxits(KSP ksp, PetscBool flg) ``` Collective ## Input Parameters - ***ksp -*** iterative context - ***flg -*** boolean flag ## Options Database Key - ***-ksp_converged_maxits -*** Declare convergence if the maximum number of iterations is reached ## Note The precise values of reason available in `KSPConvergedReason` ## See Also [](ch_ksp), `KSP`, `KSPSetConvergenceTest()`, `KSPSetTolerances()`, `KSPConvergedSkip()`, `KSPConvergedReason`, `KSPGetConvergedReason()`, `KSPConvergedDefaultSetUMIRNorm()`, `KSPConvergedDefaultSetUIRNorm()` ## Level intermediate ## Location src/ksp/ksp/interface/iterativ.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ksp/ksp/interface/iterativ.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)