SVDSetStoppingTestFunction — SLEPc 3.25.0 documentation

Skip to main content
`Ctrl`+`K`

# 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,SVDStoppingTestFn *stop,PetscCtx ctx,PetscCtxDestroyFn *destroy)

Logically Collective

## Input Parameters

- svd - the singular value solver context

- stop - the stopping test function, see `SVDStoppingTestFn` 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`), see `PetscCtxDestroyFn` for the calling sequence

## Note

When implementing a function for this, 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

SVD: Singular Value Decomposition, `SVDSetStoppingTest()`, `SVDStoppingBasic()`

## Level

advanced

## Location

src/svd/interface/svdopts.c

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