BVSetDefiniteTolerance — SLEPc 3.24.2 documentation

Skip to main content
`Ctrl`+`K`

# BVSetDefiniteTolerance

Set the tolerance to be used when checking a definite inner product.

## Synopsis

    #include "slepcbv.h"
    PetscErrorCode BVSetDefiniteTolerance(BV bv,PetscReal deftol)

Logically Collective

## Input Parameters

- bv - basis vectors

- deftol - the tolerance

## Options Database Key

- -bv_definite_tol <deftol> - the tolerance

## Notes

When using a non-standard inner product, see `BVSetMatrix()`, the solver needs to compute \(\sqrt{z^*B z}\) for various vectors \(z\). If the inner product has not been declared indefinite, the value \(z^*B z\) must be positive, but due to rounding error a tiny value may become negative. A tolerance is used to detect this situation. Likewise, in complex arithmetic \(z^*B z\) should be real, and we use the same tolerance to check whether a nonzero imaginary part can be considered negligible.

This function sets this tolerance, which defaults to `10*PETSC_MACHINE_EPSILON`. The default value should be good for most applications.

## See Also

BV: Basis Vectors, `BVSetMatrix()`

## Level

advanced

## Location

src/sys/classes/bv/interface/bvbasic.c

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