Skip to main content
`Ctrl`+`K`

# SVDTRLanczosSetLocking

Choose between locking and non-locking variants of the thick-restart Lanczos method.

## Synopsis

    #include "slepcsvd.h"
    PetscErrorCode SVDTRLanczosSetLocking(SVD svd,PetscBool lock)

Logically Collective

## Input Parameters

- svd - the singular value solver context

- lock - `PETSC_TRUE` if the locking variant must be selected

## Options Database Key

- -svd_trlanczos_locking - sets the locking flag

## Notes

The default is to lock converged singular triplets when the method restarts. This behavior can be changed so that all directions are kept in the working subspace even if already converged to working accuracy (the non-locking variant).

## See Also

SVD: Singular Value Decomposition, `SVDTRLANCZOS`, `SVDTRLanczosGetLocking()`

## Level

advanced

## Location

src/svd/impls/trlanczos/trlanczos.c

## Implementations

SVDTRLanczosSetLocking_TRLanczos() in src/svd/impls/trlanczos/trlanczos.c

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