slepc-3.16.1 2021-11-17
Report Typos and Errors

EPSSetStoppingTestFunction

Sets a function to decide when to stop the outer iteration of the eigensolver.

Synopsis

#include "slepceps.h" 
PetscErrorCode EPSSetStoppingTestFunction(EPS eps,PetscErrorCode (*func)(EPS,PetscInt,PetscInt,PetscInt,PetscInt,EPSConvergedReason*,void*),void* ctx,PetscErrorCode (*destroy)(void*))
Logically Collective on eps

Input Parameters

eps  - eigensolver context obtained from EPSCreate()
func  - pointer to the stopping test function
ctx  - context for private data for the stopping routine (may be null)
destroy  - a routine for destroying the context (may be null)

Calling Sequence of func

  func(EPS eps,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,EPSConvergedReason *reason,void *ctx)

eps  - eigensolver context obtained from EPSCreate()
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 context, as set by EPSSetStoppingTestFunction()

Note

Normal usage is to first call the default routine EPSStoppingBasic() and then set reason to EPS_CONVERGED_USER if some user-defined conditions have been met. To let the eigensolver continue iterating, the result must be left as EPS_CONVERGED_ITERATING.

See Also

EPSSetStoppingTest(), EPSStoppingBasic()

Location: src/eps/interface/epsopts.c

Examples

src/eps/tutorials/ex29.c.html
src/eps/tutorials/ex30.c.html

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