#include "slepcbv.h" PetscErrorCode BVMatLanczos(BV V,Mat A,PetscReal *alpha,PetscReal *beta,PetscInt k,PetscInt *m,PetscBool *breakdown)Collective on V
V | - basis vectors context | |
A | - the matrix | |
alpha | - diagonal entries of tridiagonal matrix | |
beta | - subdiagonal entries of tridiagonal matrix | |
k | - number of locked columns |
m | - dimension of the Lanczos basis, may be modified |
breakdown | - (optional) flag indicating that breakdown occurred |
The first k columns are assumed to be locked and therefore they are
A * V - V * T = beta_m*v_m * e_m^T
where the columns of V are the Lanczos vectors (which are B-orthonormal), T is a real symmetric tridiagonal matrix, and e_m is the m-th vector of the canonical basis. The tridiagonal is stored as two arrays: alpha contains the diagonal elements, beta the off-diagonal. On exit, the last element of beta contains the B-norm of V[m] before normalization. The basis V must have at least m+1 columns, while the arrays alpha and beta must have space for at least m elements.
The breakdown flag indicates that orthogonalization failed, see BVOrthonormalizeColumn(). In that case, on exit m contains the index of the column that failed.
The values of k and m are not restricted to the active columns of V.
To create a Lanczos factorization from scratch, set k=0 and make sure the first column contains the normalized initial vector.
Location: src/sys/classes/bv/interface/bvkrylov.c
Index of all BV routines
Table of Contents for all manual pages
Index of all manual pages