slepc-3.15.2 2021-09-20
Report Typos and Errors

# NEPSetConvergenceTestFunction

Sets a function to compute the error estimate used in the convergence test.

### Synopsis

    #include "slepcnep.h"
    PetscErrorCode NEPSetConvergenceTestFunction(NEP nep,PetscErrorCode (*func)(NEP,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*),void* ctx,PetscErrorCode (*destroy)(void*))

Logically Collective on nep

### Input Parameters

| nep | - nonlinear eigensolver context obtained from NEPCreate()
| func | - a pointer to the convergence test function
| ctx | - context for private data for the convergence routine (may be null)
| destroy | - a routine for destroying the context (may be null)

### Calling Sequence of func

      func(NEP nep,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx)

| nep | - nonlinear eigensolver context obtained from NEPCreate()
| eigr | - real part of the eigenvalue
| eigi | - imaginary part of the eigenvalue
| res | - residual norm associated to the eigenpair
| errest | - (output) computed error estimate
| ctx | - optional context, as set by NEPSetConvergenceTestFunction()

### Note

If the error estimate returned by the convergence test function is less than the tolerance, then the eigenvalue is accepted as converged.

### See Also

NEPSetConvergenceTest(), NEPSetTolerances()

Location: src/nep/interface/nepopts.c
Index of all NEP routines
Table of Contents for all manual pages
Index of all manual pages