:orphan:
# SNESSetCountersReset
Sets whether or not the counters for linear iterations and function evaluations are reset every time `SNESSolve()` is called. 
## Synopsis
```
#include "petscsnes.h"  
PetscErrorCode SNESSetCountersReset(SNES snes, PetscBool reset)
```
Logically Collective


## Input Parameters

- ***snes -*** `SNES` context
- ***reset -*** whether to reset the counters or not, defaults to `PETSC_TRUE`





## See Also
 [](ch_snes), `SNESGetNumberFunctionEvals()`, `SNESGetLinearSolveIterations()`, `SNESGetNPC()`

## Level
developer

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

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex5.c.html">src/snes/tutorials/ex5.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex55.c.html">src/snes/tutorials/ex55.c</A><BR>


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