Skip to main content
`Ctrl`+`K`

# VecCheckOrthogonality

Checks (or prints) the level of (bi-)orthogonality of a set of vectors.

## Synopsis

    #include "slepcvec.h"
    PetscErrorCode VecCheckOrthogonality(Vec V[],PetscInt nv,Vec W[],PetscInt nw,Mat B,PetscViewer viewer,PetscReal *lev)

Collective

## Input Parameters

- V - a set of vectors

- nv - number of V vectors

- W - an alternative set of vectors (optional)

- nw - number of W vectors

- B - Hermitian matrix defining the inner product (optional)

- viewer - optional visualization context

## Output Parameter

- lev - level of orthogonality (optional)

## Notes

This function computes \(W^*V\) and prints the result. It is intended to check the level of bi-orthogonality of the vectors in the two sets. If \(W\) is equal to `NULL` then \(V\) is used, thus checking the orthogonality of the \(V\) vectors.

If matrix `B` is provided then the check uses the \(B\)-inner product, \(W^*BV\), where \(B\) is assumed to be Hermitian.

If `V`, `W` represent eigenvectors computed by SLEPc, this function will not work correctly if one of the eigenvalues is complex when running with real scalars.

If `lev` is not `NULL`, it will contain the maximum entry of matrix \(W^*V - I\) (in absolute value) omitting the diagonal. Otherwise, the matrix \(W^*V\) is printed.

## See Also

`VecCheckOrthonormality()`

## Level

developer

## Location

src/sys/vec/vecutil.c

## Examples

src/eps/tutorials/ex41.c
src/eps/tutorials/ex55.c

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