slepc-3.20.2 2024-03-15
Report Typos and Errors

BVMatProject

Computes the projection of a matrix onto a subspace.

Synopsis

#include "slepcbv.h" 
PetscErrorCode BVMatProject(BV X,Mat A,BV Y,Mat M)
Collective

Input Parameters

X  - basis vectors
A  - (optional) matrix to be projected
Y  - left basis vectors, can be equal to X

Output Parameter

M  - the resulting matrix

Notes

If A=NULL, then it is assumed that X already contains A*X.

This operation is similar to BVDot(), with important differences. The goal is to compute the matrix resulting from the orthogonal projection of A onto the subspace spanned by the columns of X, M = X^H*A*X, or the oblique projection onto X along Y, M = Y^H*A*X.

A difference with respect to BVDot() is that the standard inner product is always used, regardless of a non-standard inner product being specified with BVSetMatrix().

On entry, M must be a sequential dense Mat with dimensions ky,kx at least, where ky (resp. kx) is the number of active columns of Y (resp. X). Another difference with respect to BVDot() is that all entries of M are computed except the leading ly,lx part, where ly (resp. lx) is the number of leading columns of Y (resp. X). Hence, the leading columns of X and Y participate in the computation, as opposed to BVDot(). The leading part of M is assumed to be already available from previous computations.

In the orthogonal projection case, Y=X, some computation can be saved if A is real symmetric (or complex Hermitian). In order to exploit this property, the symmetry flag of A must be set with MatSetOption().

See Also

BVDot(), BVSetActiveColumns(), BVSetMatrix()

Level

intermediate

Location

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

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