#include "slepcbv.h" PetscErrorCode BVInsertConstraints(BV V,PetscInt *nc,Vec *C)Collective
V | - basis vectors | |
C | - set of vectors to be inserted as constraints |
nc | - number of input vectors, on output the number of linearly independent vectors |
Constraints are not stored in regular BV columns, but in a special part of the storage. They can be accessed with negative indices in BVGetColumn().
This operation is DESTRUCTIVE, meaning that all data contained in the columns of V is lost. This is typically invoked just after creating the BV. Once a set of constraints has been set, it is not allowed to call this function again.
The vectors are copied one by one and then orthogonalized against the previous ones. If any of them is linearly dependent then it is discarded and the value of nc is decreased. The behaviour is similar to BVInsertVecs().