The Locally Optimal Block Preconditioned Conjugate Gradient Method (LOBPCG) method for matrix-free computation of eigenvalues and eigenvectors. More...
#include <LOBPCG.h>
The Locally Optimal Block Preconditioned Conjugate Gradient Method (LOBPCG) method for matrix-free computation of eigenvalues and eigenvectors.
This class solves generalized eigenvalue problems of the form \(Av = \lambda Bv\) when the matrix \(A\) is symmetric and the matrix \(B\) is symmetric positive definite. It uses the The Locally Optimal Block Preconditioned Conjugate Gradient Method (LOBPCG) method described in "TOWARD THE OPTIMAL PRECONDITIONED EIGENSOLVER: LOCALLY OPTIMAL BLOCK PRECONDITIONED CONJUGATE GRADIENT METHOD" by ANDREW V. KNYAZEV.
Public Member Functions | |
LOBPCG (int numEigsIn, double eigRelTolIn=0.0, double eigAbsTolIn=0.0, int blockSizeIn=-1, double solverTolIn=-1, int maxItsIn=-1, int verbosityIn=0) | |
LOBPCG (boost::property_tree::ptree const &options) | |
virtual | ~LOBPCG ()=default |
LOBPCG & | compute (std::shared_ptr< LinearOperator > const &A, std::shared_ptr< LinearOperator > B=nullptr, std::shared_ptr< LinearOperator > M=nullptr) |
Public Member Functions inherited from muq::Modeling::GeneralizedEigenSolver | |
virtual | ~GeneralizedEigenSolver ()=default |
Eigen::VectorXd const & | eigenvalues () const |
Eigen::MatrixXd const & | eigenvectors () const |
LOBPCG::LOBPCG | ( | int | numEigsIn, |
double | eigRelTolIn = 0.0 , |
||
double | eigAbsTolIn = 0.0 , |
||
int | blockSizeIn = -1 , |
||
double | solverTolIn = -1 , |
||
int | maxItsIn = -1 , |
||
int | verbosityIn = 0 |
||
) |
[in] | numEigsIn | The maximum number of eigenvalues to compute used as a stopping criteria. |
[in] | blockSizeIn | The number of eigenvalues to compute at once |
[in] | eigTolIn | Fraction of the largest eigenvalue used as stopping criteria. |
[in] | solverTolIn | Solver tolerance |
[in] | maxItsIn | The maximum number of iterations the solver is allowed to take. |
[in] | largestIn | A boolean specifying if the largest (true) or smallest (false) eigenvalues should be computed. |
[in] | verbosityIn | An integer {0,1,2,3} specifying how much information the solver should print. When verbosityIn=0 (default), nothing is printed. |
Definition at line 10 of file LOBPCG.cpp.
LOBPCG::LOBPCG | ( | boost::property_tree::ptree const & | options | ) |
Configuration Parameters:
Parameter Key | Type | Default Value | Description |
---|---|---|---|
"NumEigs" | integer | - | The maximum number of eigenvalues to compute. Used as stopping criteria. |
"RelativeTolerance" | double | 0.0 | Fraction of the largest eigenvalue used as stopping criteria. |
"AbsoluteTolerance" | double | 0.0 | Value of smallest eigenvalue to compute. Used as stopping criteria. |
"BlockSize" | integer | 1 | How many eigenvalues and eigenvectors should be computed simultaneously. |
"SolverTolerance" | double | \(d\sqrt{\epsilon}\) | Tolerance used for stopping criteria. |
"MaxIts" | integer | min(d,20) | Maximum number of iterations to take. |
"Verbosity" | integer | 0 | Specifies how much is printed to the screen. Valid values are 0 (print nothing), 1, 2, or 3 |
Definition at line 30 of file LOBPCG.cpp.
|
virtualdefault |
|
inline |
Compute the generalized eigenvalues and eigenvectors of a symmetric system \(Av = \lambda Bv\). If compute has been previously called, the eigenvalues and eigenvectors from the previous call will be used as an initial guess for this call to the solver. This can speed up the solver if A changes slightly and the eigenvalues need to be recomputed (as in DILI MCMC).
[in] | A | A shared pointer to a muq::Modeling::LinearOperator instance specifying the matrix A. |
[in] | B | A shared pointer to a muq::Modeling::LinearOperator instance specifying the matrix B. If not specified or set to nullptr, B will be set to the identity. |
[in] | M | An optional preconditioner. If specified, the LinearOperator M should approximate the inverse of A. |
Definition at line 64 of file LOBPCG.h.
References muq::Modeling::GeneralizedEigenSolver::A, muq::Modeling::GeneralizedEigenSolver::B, and muq::Modeling::GeneralizedEigenSolver::M.