Spectra
Spectra::GenEigsRealShiftSolver< Scalar, SelectionRule, OpType > Class Template Reference

#include <GenEigsRealShiftSolver.h>

Inheritance diagram for Spectra::GenEigsRealShiftSolver< Scalar, SelectionRule, OpType >:
Spectra::GenEigsSolver< Scalar, SelectionRule, OpType >

Public Member Functions

 GenEigsRealShiftSolver (OpType *op, int nev, int ncv, Scalar sigma)
 
- Public Member Functions inherited from Spectra::GenEigsSolver< Scalar, SelectionRule, OpType >
 GenEigsSolver (OpType *op, int nev, int ncv)
 
virtual ~GenEigsSolver ()
 
void init (const Scalar *init_resid)
 
void init ()
 
int compute (int maxit=1000, Scalar tol=1e-10, int sort_rule=LARGEST_MAGN)
 
int info () const
 
int num_iterations () const
 
int num_operations () const
 
ComplexVector eigenvalues () const
 
ComplexMatrix eigenvectors (int nvec) const
 
ComplexMatrix eigenvectors () const
 

Detailed Description

template<typename Scalar = double, int SelectionRule = LARGEST_MAGN, typename OpType = DenseGenRealShiftSolve<double>>
class Spectra::GenEigsRealShiftSolver< Scalar, SelectionRule, OpType >

This class implements the eigen solver for general real matrices with a real shift value in the shift-and-invert mode. The background knowledge of the shift-and-invert mode can be found in the documentation of the SymEigsShiftSolver class.

Template Parameters
ScalarThe element type of the matrix. Currently supported types are float, double and long double.
SelectionRuleAn enumeration value indicating the selection rule of the shifted-and-inverted eigenvalues. The full list of enumeration values can be found in Enumerations.
OpTypeThe name of the matrix operation class. Users could either use the wrapper classes such as DenseGenRealShiftSolve and SparseGenRealShiftSolve, or define their own that impelemnts all the public member functions as in DenseGenRealShiftSolve.

Definition at line 39 of file GenEigsRealShiftSolver.h.

Constructor & Destructor Documentation

◆ GenEigsRealShiftSolver()

template<typename Scalar = double, int SelectionRule = LARGEST_MAGN, typename OpType = DenseGenRealShiftSolve<double>>
Spectra::GenEigsRealShiftSolver< Scalar, SelectionRule, OpType >::GenEigsRealShiftSolver ( OpType *  op,
int  nev,
int  ncv,
Scalar  sigma 
)
inline

Constructor to create a eigen solver object using the shift-and-invert mode.

Parameters
opPointer to the matrix operation object. This class should implement the shift-solve operation of \(A\): calculating \((A-\sigma I)^{-1}v\) for any vector \(v\). Users could either create the object from the wrapper class such as DenseGenRealShiftSolve, or define their own that impelemnts all the public member functions as in DenseGenRealShiftSolve.
nevNumber of eigenvalues requested. This should satisfy \(1\le nev \le n-2\), where \(n\) is the size of matrix.
ncvParameter that controls the convergence speed of the algorithm. Typically a larger ncv means faster convergence, but it may also result in greater memory use and more matrix operations in each iteration. This parameter must satisfy \(nev+2 \le ncv \le n\), and is advised to take \(ncv \ge 2\cdot nev + 1\).
sigmaThe real-valued shift.

Definition at line 75 of file GenEigsRealShiftSolver.h.


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