NEPGetIterationNumber — SLEPc 3.25.1 documentation

Skip to main content
`Ctrl`+`K`

# NEPGetIterationNumber

Gets the current iteration number. If the call to `NEPSolve()` is complete, then it returns the number of iterations carried out by the solution method.

## Synopsis

    #include "slepcnep.h"
    PetscErrorCode NEPGetIterationNumber(NEP nep,PetscInt *its)

Not Collective

## Input Parameter

- nep - the nonlinear eigensolver context

## Output Parameter

- its - number of iterations

## Note

During the \(i\)-th iteration this call returns \(i-1\). If `NEPSolve()` is complete, then parameter `its` contains either the iteration number at which convergence was successfully reached, or failure was detected. Call `NEPGetConvergedReason()` to determine if the solver converged or failed and why.

## See Also

NEP: Nonlinear Eigenvalue Problems, `NEPGetConvergedReason()`, `NEPSetTolerances()`

## Level

intermediate

## Location

src/nep/interface/nepsolve.c

## Examples

src/nep/tutorials/ex20.c
src/nep/tutorials/ex20f.F90

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