slepc-3.22.1 2024-10-28
Report Typos and Errors

# PEPSetStoppingTestFunction

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

### Synopsis

    #include "slepcpep.h"
    PetscErrorCode PEPSetStoppingTestFunction(PEP pep,PEPStoppingTestFn *stop,void* ctx,PetscErrorCode (*destroy)(void*))

Logically Collective

### Input Parameters

| pep | - eigensolver context obtained from PEPCreate()
| stop | - stopping test function, see PEPStoppingTestFn for the calling sequence
| ctx | - context for private data for the stopping routine (may be NULL)
| destroy | - a routine for destroying the context (may be NULL)

### Note

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

### See Also

PEPSetStoppingTest(), PEPStoppingBasic()

### Level

advanced

### Location

src/pep/interface/pepopts.c
Index of all PEP routines
Table of Contents for all manual pages
Index of all manual pages