Skip to main content
`Ctrl`+`K`

# SVDStoppingTestFn

A prototype of an `SVD` stopping test function that would be passed to `SVDSetStoppingTestFunction()`.

## Synopsis

    PETSC_EXTERN_TYPEDEF typedef PetscErrorCode SVDStoppingTestFn(SVD svd,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nsv,SVDConvergedReason *reason,void *ctx);

## Calling Sequence

- svd - the singular value solver context

- 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 stopping context, as set by `SVDSetStoppingTestFunction()`

## Note

A positive value of `reason` indicates that the iteration has finished successfully (converged), and a negative value indicates an error condition (diverged). If the iteration needs to be continued, `reason` must be set to `SVD_CONVERGED_ITERATING` (zero).

## See Also

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

## Level

advanced

## Location

include/slepcsvd.h

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