MUQ  0.4.3
muq::Modeling::LOBPCG Class Reference

The Locally Optimal Block Preconditioned Conjugate Gradient Method (LOBPCG) method for matrix-free computation of eigenvalues and eigenvectors. More...

#include <LOBPCG.h>

Inheritance diagram for muq::Modeling::LOBPCG:

Detailed Description

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.

Definition at line 20 of file LOBPCG.h.

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
 
LOBPCGcompute (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
 

Constructor & Destructor Documentation

◆ LOBPCG() [1/2]

LOBPCG::LOBPCG ( int  numEigsIn,
double  eigRelTolIn = 0.0,
double  eigAbsTolIn = 0.0,
int  blockSizeIn = -1,
double  solverTolIn = -1,
int  maxItsIn = -1,
int  verbosityIn = 0 
)
Parameters
[in]numEigsInThe maximum number of eigenvalues to compute used as a stopping criteria.
[in]blockSizeInThe number of eigenvalues to compute at once
[in]eigTolInFraction of the largest eigenvalue used as stopping criteria.
[in]solverTolInSolver tolerance
[in]maxItsInThe maximum number of iterations the solver is allowed to take.
[in]largestInA boolean specifying if the largest (true) or smallest (false) eigenvalues should be computed.
[in]verbosityInAn 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() [2/2]

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.

◆ ~LOBPCG()

virtual muq::Modeling::LOBPCG::~LOBPCG ( )
virtualdefault

Member Function Documentation

◆ compute()

LOBPCG & LOBPCG::compute ( std::shared_ptr< LinearOperator > const &  A,
std::shared_ptr< LinearOperator B = nullptr,
std::shared_ptr< LinearOperator M = nullptr 
)
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).

Parameters
[in]AA shared pointer to a muq::Modeling::LinearOperator instance specifying the matrix A.
[in]BA 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]MAn 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.


The documentation for this class was generated from the following files: