# SNESGetConvergenceHistory
Gets the array used to hold the convergence history. 
## Synopsis
```
#include "petscsnes.h"  
PetscErrorCode SNESGetConvergenceHistory(SNES snes, PetscReal *a[], PetscInt *its[], PetscInt *na)
```
Not Collective


## Input Parameter

- ***snes -*** iterative context obtained from `SNESCreate()`



## Output Parameters

- ***a   -*** array to hold history, usually was set with `SNESSetConvergenceHistory()`
- ***its -*** integer array holds the number of linear iterations (or
negative if not converged) for each solve.
- ***na  -*** size of a and its



## Notes
The calling sequence for this routine in Fortran is
```none
call SNESGetConvergenceHistory(SNES snes, integer na, integer ierr)
```

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.




## See Also
 `SNES`, `SNESSolve()`, `SNESSetConvergenceHistory()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/interface/snes.c.html#SNESGetConvergenceHistory">src/snes/interface/snes.c</A>


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


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