:orphan:
# TaoGetConvergenceHistory
Gets the arrays used that hold the convergence history. 
## Synopsis
```
#include "petsctao.h" 
PetscErrorCode TaoGetConvergenceHistory(Tao tao, PetscReal **obj, PetscReal **resid, PetscReal **cnorm, PetscInt **lits, PetscInt *nhist)
```
Collective


## Input Parameter

- ***tao -*** the `Tao` context



## Output Parameters

- ***obj   -*** array used to hold objective value history
- ***resid -*** array used to hold residual history
- ***cnorm -*** array used to hold constraint violation history
- ***lits  -*** integer array used to hold linear solver iteration count
- ***nhist  -*** size of `obj`, `resid`, `cnorm`, and `lits`





## Notes
This routine must be preceded by calls to `TaoSetConvergenceHistory()`
and `TaoSolve()`, otherwise it returns useless information.

This routine is useful, e.g., when running a code for purposes
of accurate performance monitoring, when no I/O should be done
during the section of code that is being timed.


## Fortran Note
The calling sequence is
```none
   call TaoGetConvergenceHistory(Tao tao, PetscInt nhist, PetscErrorCode ierr)
```



## See Also
 [](ch_tao), `Tao`, `TaoSolve()`, `TaoSetConvergenceHistory()`

## Level
advanced

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

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/leastsquares/tutorials/chwirut1f.F90.html">src/tao/leastsquares/tutorials/chwirut1f.F90</A><BR>


---
[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](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
