#include <GenEigsBase.h>
Public Member Functions | |
Index | compute (Index maxit=1000, Scalar tol=1e-10, int sort_rule=LARGEST_MAGN) |
ComplexVector | eigenvalues () const |
ComplexMatrix | eigenvectors () const |
ComplexMatrix | eigenvectors (Index nvec) const |
int | info () const |
void | init () |
void | init (const Scalar *init_resid) |
Index | num_iterations () const |
Index | num_operations () const |
Protected Member Functions | |
virtual void | sort_ritzpair (int sort_rule) |
Protected Attributes | |
ArnoldiFac | m_fac |
const Index | m_n |
const Index | m_ncv |
const Index | m_nev |
Index | m_niter |
Index | m_nmatop |
OpType * | m_op |
ComplexVector | m_ritz_est |
ComplexVector | m_ritz_val |
ComplexMatrix | m_ritz_vec |
Private Types | |
typedef Arnoldi< Scalar, ArnoldiOpType > | ArnoldiFac |
typedef ArnoldiOp< Scalar, OpType, BOpType > | ArnoldiOpType |
typedef Eigen::Array< Scalar, Eigen::Dynamic, 1 > | Array |
typedef Eigen::Array< bool, Eigen::Dynamic, 1 > | BoolArray |
typedef std::complex< Scalar > | Complex |
typedef Eigen::Matrix< Complex, Eigen::Dynamic, Eigen::Dynamic > | ComplexMatrix |
typedef Eigen::Matrix< Complex, Eigen::Dynamic, 1 > | ComplexVector |
typedef Eigen::Index | Index |
typedef Eigen::Map< const Vector > | MapConstVec |
typedef Eigen::Map< Matrix > | MapMat |
typedef Eigen::Map< Vector > | MapVec |
typedef Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > | Matrix |
typedef Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > | Vector |
Private Member Functions | |
Index | nev_adjusted (Index nconv) |
Index | num_converged (Scalar tol) |
void | restart (Index k) |
void | retrieve_ritzpair () |
Static Private Member Functions | |
static bool | is_complex (const Complex &v) |
static bool | is_conj (const Complex &v1, const Complex &v2) |
Private Attributes | |
const Scalar | m_eps |
const Scalar | m_eps23 |
int | m_info |
const Scalar | m_near_0 |
BoolArray | m_ritz_conv |
This is the base class for general eigen solvers, mainly for internal use. It is kept here to provide the documentation for member functions of concrete eigen solvers such as GenEigsSolver and GenEigsRealShiftSolver.
Definition at line 40 of file GenEigsBase.h.
|
private |
Definition at line 57 of file GenEigsBase.h.
|
private |
Definition at line 56 of file GenEigsBase.h.
|
private |
Definition at line 46 of file GenEigsBase.h.
|
private |
Definition at line 47 of file GenEigsBase.h.
|
private |
Definition at line 52 of file GenEigsBase.h.
|
private |
Definition at line 53 of file GenEigsBase.h.
|
private |
Definition at line 54 of file GenEigsBase.h.
|
private |
Definition at line 43 of file GenEigsBase.h.
|
private |
Definition at line 50 of file GenEigsBase.h.
|
private |
Definition at line 48 of file GenEigsBase.h.
|
private |
Definition at line 49 of file GenEigsBase.h.
|
private |
Definition at line 44 of file GenEigsBase.h.
|
private |
Definition at line 45 of file GenEigsBase.h.
|
inline |
Conducts the major computation procedure.
maxit | Maximum number of iterations allowed in the algorithm. |
tol | Precision parameter for the calculated eigenvalues. |
sort_rule | Rule to sort the eigenvalues and eigenvectors. Supported values are Spectra::LARGEST_MAGN , Spectra::LARGEST_REAL , Spectra::LARGEST_IMAG , Spectra::SMALLEST_MAGN , Spectra::SMALLEST_REAL and Spectra::SMALLEST_IMAG , for example LARGEST_MAGN indicates that eigenvalues with largest magnitude come first. Note that this argument is only used to sort the final result, and the selection rule (e.g. selecting the largest or smallest eigenvalues in the full spectrum) is specified by the template parameter SelectionRule of GenEigsSolver. |
Definition at line 368 of file GenEigsBase.h.
|
inline |
Returns the converged eigenvalues.
Eigen::Vector<std::complex<Scalar>, ...>
, depending on the template parameter Scalar
defined. Definition at line 416 of file GenEigsBase.h.
|
inline |
Returns all converged eigenvectors.
Definition at line 474 of file GenEigsBase.h.
|
inline |
Returns the eigenvectors associated with the converged eigenvalues.
nvec | The number of eigenvectors to return. |
Eigen::Matrix<std::complex<Scalar>, ...>
, depending on the template parameter Scalar
defined. Definition at line 446 of file GenEigsBase.h.
|
inline |
Returns the status of the computation. The full list of enumeration values can be found in Enumerations.
Definition at line 397 of file GenEigsBase.h.
|
inline |
Initializes the solver by providing a random initial residual vector.
This overloaded function generates a random initial residual vector (with a fixed random seed) for the algorithm. Elements in the vector follow independent Uniform(-0.5, 0.5) distribution.
Definition at line 341 of file GenEigsBase.h.
|
inline |
Initializes the solver by providing an initial residual vector.
init_resid | Pointer to the initial residual vector. |
Spectra (and also ARPACK) uses an iterative algorithm to find eigenvalues. This function allows the user to provide the initial residual vector.
Definition at line 313 of file GenEigsBase.h.
|
inlinestaticprivate |
Definition at line 88 of file GenEigsBase.h.
|
inlinestaticprivate |
Definition at line 89 of file GenEigsBase.h.
|
inlineprivate |
Definition at line 159 of file GenEigsBase.h.
|
inlineprivate |
Definition at line 147 of file GenEigsBase.h.
|
inline |
Returns the number of iterations used in the computation.
Definition at line 402 of file GenEigsBase.h.
|
inline |
Returns the number of matrix operations used in the computation.
Definition at line 407 of file GenEigsBase.h.
|
inlineprivate |
Definition at line 92 of file GenEigsBase.h.
|
inlineprivate |
Definition at line 190 of file GenEigsBase.h.
|
inlineprotectedvirtual |
Reimplemented in Spectra::GenEigsComplexShiftSolver< Scalar, SelectionRule, OpType >, and Spectra::GenEigsRealShiftSolver< Scalar, SelectionRule, OpType >.
Definition at line 214 of file GenEigsBase.h.
|
private |
Definition at line 81 of file GenEigsBase.h.
|
private |
Definition at line 82 of file GenEigsBase.h.
|
protected |
Definition at line 69 of file GenEigsBase.h.
|
private |
Definition at line 77 of file GenEigsBase.h.
|
protected |
Definition at line 63 of file GenEigsBase.h.
|
protected |
Definition at line 65 of file GenEigsBase.h.
|
private |
Definition at line 79 of file GenEigsBase.h.
|
protected |
Definition at line 64 of file GenEigsBase.h.
|
protected |
Definition at line 67 of file GenEigsBase.h.
|
protected |
Definition at line 66 of file GenEigsBase.h.
|
protected |
Definition at line 61 of file GenEigsBase.h.
|
private |
Definition at line 76 of file GenEigsBase.h.
|
protected |
Definition at line 73 of file GenEigsBase.h.
|
protected |
Definition at line 71 of file GenEigsBase.h.
|
protected |
Definition at line 72 of file GenEigsBase.h.