slepc-3.14.2 2021-02-01
Report Typos and Errors

# BVOrthonormalizeColumn

Orthonormalize one of the column vectors with respect to the previous ones. This is equivalent to a call to BVOrthogonalizeColumn() followed by a call to BVScaleColumn() with the reciprocal of the norm.

### Synopsis

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

Collective on bv

### 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 function first orthogonalizes vector V[j] with respect to V[0..j-1], where V[.] are the vectors of BV. 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 TRUE. The vector will be replaced by a random vector also if lindep was set to TRUE, even if the norm is not exaclty 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

BVOrthogonalizeColumn(), BVScaleColumn()

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