Skip to main content
`Ctrl`+`K`

# EPSSetTolerances

Sets the tolerance and maximum iteration count used by the `EPS` convergence tests.

## Synopsis

    #include "slepceps.h"
    PetscErrorCode EPSSetTolerances(EPS eps,PetscReal tol,PetscInt maxits)

Logically Collective

## Input Parameters

- eps - the linear eigensolver context

- tol - the convergence tolerance

- maxits - maximum number of iterations to use

## Options Database Keys

- -eps_tol <tol> - sets the convergence tolerance

- -eps_max_it <maxits> - sets the maximum number of iterations allowed

## Note

Use `PETSC_CURRENT` to retain the current value of any of the parameters. Use `PETSC_DETERMINE` for either argument to assign a default value computed internally (may be different in each solver). For `maxits` use `PETSC_UNLIMITED` to indicate there is no upper bound on this value.

## See Also

EPS: Eigenvalue Problem Solver, `EPSGetTolerances()`

## Level

intermediate

## Location

src/eps/interface/epsopts.c

## Examples

src/eps/tutorials/ex47.c
src/eps/tutorials/ex19.c
src/eps/tutorials/ex30.c

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