BVOrthogonalize — SLEPc 3.25.0 documentation

Skip to main content
`Ctrl`+`K`

# BVOrthogonalize

Orthogonalize all columns (starting from the leading ones), that is, compute the QR decomposition.

## Synopsis

    #include "slepcbv.h"
    PetscErrorCode BVOrthogonalize(BV V,Mat R)

Collective

## Input Parameters

- V - basis vectors to be orthogonalized (or \(B\)-orthogonalized), modified on output

- R - a sequential dense matrix (or `NULL`), on output the triangular factor of the QR decomposition

## Notes

On input, matrix `R` must be a square sequential dense `Mat`, with at least as many rows and columns as the number of active columns of `V`. The output satisfies \(V = \tilde V R\) (where \(\tilde V\) represents `V` on exit) and \(\tilde V^*\tilde V = I\) (or \(\tilde V^*B\tilde V = I\) if an inner product matrix \(B\) has been specified with `BVSetMatrix()`).

If `V` has leading columns, then they are not modified (are assumed to be already orthonormal) and the leading columns of `R` are not referenced. Let the decomposition be

\[\begin{split} \begin{bmatrix} V_1 & V_2 \end{bmatrix}= \begin{bmatrix} \tilde V_1 & \tilde V_2 \end{bmatrix} \begin{bmatrix} R_{11} & R_{12} \\ 0 & R_{22} \end{bmatrix} \end{split}\]
then \(\tilde V_1\) is left unchanged (equal to \(V_1\)) as well as \(R_{11}\) (they should satisfy \(V_1 = \tilde V_1 R_{11}\)).

Can pass `NULL` if `R` is not required.

The method to be used for block orthogonalization can be set with `BVSetOrthogonalization()`. If set to `BV_ORTHOG_BLOCK_GS`, the computation is done column by column with successive calls to `BVOrthogonalizeColumn()`. Note that in the `BV_ORTHOG_BLOCK_SVQB` method the `R` factor is not upper triangular.

If `V` is rank-deficient or very ill-conditioned, that is, one or more columns are (almost) linearly dependent with respect to the rest, then the algorithm may break down or result in larger numerical error. Linearly dependent columns are essentially replaced by random directions, and the corresponding diagonal entry in `R` is set to (nearly) zero.

## See Also

BV: Basis Vectors, `BVOrthogonalizeColumn()`, `BVOrthogonalizeVec()`, `BVSetMatrix()`, `BVSetActiveColumns()`, `BVSetOrthogonalization()`, `BVOrthogBlockType`

## Level

intermediate

## 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