Skip to main content
`Ctrl`+`K`

# SVDSetConvergenceTestFunction

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

## Synopsis

    #include "slepcsvd.h"
    PetscErrorCode SVDSetConvergenceTestFunction(SVD svd,SVDConvergenceTestFn *conv,void *ctx,PetscCtxDestroyFn *destroy)

Logically Collective

## Input Parameters

- svd - the singular value solver context

- conv - the convergence test function, see `SVDConvergenceTestFn` for the calling sequence

- ctx - context for private data for the convergence routine (may be `NULL`)

- destroy - a routine for destroying the context (may be `NULL`), see `PetscCtxDestroyFn` for the calling sequence

## Notes

When this is called with a user-defined function, then the convergence criterion is set to `SVD_CONV_USER`, see `SVDSetConvergenceTest()`.

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

## See Also

SVD: Singular Value Decomposition, `SVDSetConvergenceTest()`, `SVDSetTolerances()`

## 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