Spectra  1.0.1
Header-only C++ Library for Large Scale Eigenvalue Problems
Spectra::DavidsonSymEigsSolver< OpType > Class Template Reference

#include <Spectra/DavidsonSymEigsSolver.h>

Inheritance diagram for Spectra::DavidsonSymEigsSolver< OpType >:
Spectra::JDSymEigsBase< DavidsonSymEigsSolver< OpType >, OpType >

Public Member Functions

 DavidsonSymEigsSolver (OpType &op, Index nev, Index nvec_init, Index nvec_max)
 
 DavidsonSymEigsSolver (OpType &op, Index nev)
 
Matrix setup_initial_search_space (SortRule selection) const
 
Matrix calculate_correction_vector () const
 
- Public Member Functions inherited from Spectra::JDSymEigsBase< DavidsonSymEigsSolver< OpType >, OpType >
 JDSymEigsBase (OpType &op, Index nev, Index nvec_init, Index nvec_max)
 
 JDSymEigsBase (OpType &op, Index nev)
 
void set_max_search_space_size (Index max_search_space_size)
 
void set_correction_size (Index correction_size)
 
void set_initial_search_space_size (Index initial_search_space_size)
 
virtual ~JDSymEigsBase ()
 
CompInfo info () const
 
Index num_iterations () const
 
Vector eigenvalues () const
 
Matrix eigenvectors () const
 
Index compute (SortRule selection=SortRule::LargestMagn, Index maxit=100, Scalar tol=100 *Eigen::NumTraits< Scalar >::dummy_precision())
 
Index compute_with_guess (const Eigen::Ref< const Matrix > &initial_space, SortRule selection=SortRule::LargestMagn, Index maxit=100, Scalar tol=100 *Eigen::NumTraits< Scalar >::dummy_precision())
 

Detailed Description

template<typename OpType>
class Spectra::DavidsonSymEigsSolver< OpType >

This class implement the DPR correction for the Davidson algorithms. The algorithms in the Davidson family only differ in how the correction vectors are computed and optionally in the initial orthogonal basis set.

the DPR correction compute the new correction vector using the following expression:

\[ correction = -(\boldsymbol{D} - \rho \boldsymbol{I})^{-1} \boldsymbol{r} \]

where \(D\) is the diagonal of the target matrix, \(\rho\) the Ritz eigenvalue, \(I\) the identity matrix and \(r\) the residue vector.

Definition at line 31 of file DavidsonSymEigsSolver.h.

Member Function Documentation

◆ setup_initial_search_space()

template<typename OpType >
Matrix Spectra::DavidsonSymEigsSolver< OpType >::setup_initial_search_space ( SortRule  selection) const
inline

Create initial search space based on the diagonal and the spectrum'target (highest or lowest)

Parameters
selectionSpectrum section to target (e.g. lowest, etc.)
Returns
Matrix with the initial orthonormal basis

Definition at line 60 of file DavidsonSymEigsSolver.h.

◆ calculate_correction_vector()

template<typename OpType >
Matrix Spectra::DavidsonSymEigsSolver< OpType >::calculate_correction_vector ( ) const
inline

Compute the corrections using the DPR method.

Returns
New correction vectors.

Definition at line 77 of file DavidsonSymEigsSolver.h.


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