slepc-3.7.3 2016-09-29
Report Typos and Errors

# SVDSetStoppingTestFunction

Sets a function to decide when to stop the outer iteration of the singular value solver.

### Synopsis

    #include "slepcsvd.h"
    PetscErrorCode SVDSetStoppingTestFunction(SVD svd,PetscErrorCode (*func)(SVD,PetscInt,PetscInt,PetscInt,PetscInt,SVDConvergedReason*,void*),void* ctx,PetscErrorCode (*destroy)(void*))

Logically Collective on SVD

### Input Parameters

| svd | - singular value solver context obtained from SVDCreate()
| 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(SVD svd,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nsv,SVDConvergedReason *reason,void *ctx)

| svd | - singular value solver context obtained from SVDCreate()
| its | - current number of iterations
| max_it | - maximum number of iterations
| nconv | - number of currently converged singular triplets
| nsv | - number of requested singular triplets
| reason | - (output) result of the stopping test
| ctx | - optional context, as set by SVDSetStoppingTestFunction()

### Note

Normal usage is to first call the default routine SVDStoppingBasic() and then set reason to SVD_CONVERGED_USER if some user-defined conditions have been met. To let the singular value solver continue iterating, the result must be left as SVD_CONVERGED_ITERATING.

### See Also

SVDSetStoppingTest(), SVDStoppingBasic()

Location: src/svd/interface/svdopts.c
Index of all SVD routines
Table of Contents for all manual pages
Index of all manual pages