Skip to main content
`Ctrl`+`K`

# SNESSetCountersReset

Sets whether or not the counters for linear iterations and function evaluations are reset every time `SNESSolve()` is called.

## Synopsis

    #include "petscsnes.h"
    #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

SNES: Nonlinear Solvers, `SNESGetNumberFunctionEvals()`, `SNESGetLinearSolveIterations()`, `SNESGetNPC()`

## Level

developer

## Location

src/snes/interface/snes.c

## Examples

src/snes/tutorials/ex5.c
src/snes/tutorials/ex55.c

Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages