BVOrthonormalizeColumn — SLEPc 3.25.1 documentation

Skip to main content
`Ctrl`+`K`

# BVOrthonormalizeColumn

Orthonormalize one of the column vectors with respect to the previous ones.

## Synopsis

    #include "slepcbv.h"
    PetscErrorCode BVOrthonormalizeColumn(BV bv,PetscInt j,PetscBool replace,PetscReal *norm,PetscBool *lindep)

Collective

## Input Parameters

- bv - the basis vectors context

- j - index of column to be orthonormalized

- replace - whether it is allowed to set the vector randomly

## Output Parameters

- norm - (optional) norm of the vector after orthogonalization and before normalization

- lindep - (optional) flag indicating that linear dependence was determined during orthogonalization

## Notes

This is equivalent to a call to `BVOrthogonalizeColumn()` followed by a call to `BVScaleColumn()` with the reciprocal of the norm.

This function first orthogonalizes vector \(v_j\) with respect to \(v_{0:j-1}\). A byproduct of this computation is `norm`, the norm of the vector after orthogonalization. Secondly, it scales the vector with `1/norm`, so that the resulting vector has unit norm.

If after orthogonalization the vector \(v_j\) is exactly zero, it cannot be normalized because `norm=0`. In that case, it could be left as zero or replaced by a random vector that is then orthonormalized. The latter is achieved by setting the argument `replace` to `PETSC_TRUE`. The vector will be replaced by a random vector also if `lindep` was set to `PETSC_TRUE`, even if the norm is not exactly zero.

If the vector has been replaced by a random vector, the output arguments `norm` and `lindep` will be set according to the orthogonalization of this new vector.

## See Also

BV: Basis Vectors, `BVOrthogonalizeColumn()`, `BVScaleColumn()`

## Level

advanced

## Location

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

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