NEPStoppingTestFn — SLEPc 3.24.2 documentation

Skip to main content
`Ctrl`+`K`

# NEPStoppingTestFn

A prototype of a `NEP` stopping test function that would be passed to `NEPSetStoppingTestFunction()`.

## Synopsis

    PETSC_EXTERN_TYPEDEF typedef PetscErrorCode NEPStoppingTestFn(NEP nep,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,NEPConvergedReason *reason,void *ctx);

## Calling Sequence

- nep - the nonlinear eigensolver context

- its - current number of iterations

- max_it - maximum number of iterations

- nconv - number of currently converged eigenpairs

- nev - number of requested eigenpairs

- reason - [output] result of the stopping test

- ctx - optional stopping context, as set by `NEPSetStoppingTestFunction()`

## Note

A positive value of `reason` indicates that the iteration has finished successfully (converged), and a negative value indicates an error condition (diverged). If the iteration needs to be continued, `reason` must be set to `NEP_CONVERGED_ITERATING` (zero).

## See Also

NEP: Nonlinear Eigenvalue Problems, `NEPSetStoppingTestFunction()`

## Level

advanced

## Location

include/slepcnep.h

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