# TaoDefaultConvergenceTest
Determines whether the solver should continue iterating or terminate. 
## Synopsis
```
#include "petsctao.h" 
PetscErrorCode TaoDefaultConvergenceTest(Tao tao, void *dummy)
```
Collective on tao


## Input Parameters

- ***tao -*** the Tao context
- ***dummy -*** unused dummy context



## Output Parameter

- ***reason -*** for terminating



## Notes
This routine checks the residual in the optimality conditions, the
relative residual in the optimity conditions, the number of function
evaluations, and the function value to test convergence.  Some
solvers may use different convergence routines.




## See Also
 `TaoSetTolerances()`, `TaoGetConvergedReason()`, `TaoSetConvergedReason()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/interface/taosolver.c.html#TaoDefaultConvergenceTest">src/tao/interface/taosolver.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/tao/interface/taosolver.c)


[Index of all Tao routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
