Description
template<typename OpType, typename BOpType>
class Spectra::GenEigsBase< OpType, BOpType >
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.
#include <GenEigsBase.h>
Public Member Functions | |
| void | init (const Scalar *init_resid) |
| Initializes the solver by providing an initial residual vector. More... | |
| void | init () |
| Initializes the solver by providing a random initial residual vector. More... | |
| Index | compute (SortRule selection=SortRule::LargestMagn, Index maxit=1000, RealScalar tol=1e-10, SortRule sorting=SortRule::LargestMagn) |
| Conducts the major computation procedure. More... | |
| CompInfo | info () const |
| Returns the status of the computation. More... | |
| Index | num_iterations () const |
| Returns the number of iterations used in the computation. | |
| Index | num_operations () const |
| Returns the number of matrix operations used in the computation. | |
| ComplexVector | eigenvalues () const |
| Returns the converged eigenvalues. More... | |
| ComplexMatrix | eigenvectors (Index nvec) const |
| Returns the eigenvectors associated with the converged eigenvalues. More... | |
| ComplexMatrix | eigenvectors () const |
| Returns all converged eigenvectors. | |
Protected Member Functions | |
| virtual void | sort_ritzpair (SortRule sort_rule) |
Member Function Documentation
◆ compute()
|
inline |
Conducts the major computation procedure.
- Parameters
-
selection An enumeration value indicating the selection rule of the requested eigenvalues, for example SortRule::LargestMagnto retrieve eigenvalues with the largest magnitude. The full list of enumeration values can be found in Enumerations.maxit Maximum number of iterations allowed in the algorithm. tol Precision parameter for the calculated eigenvalues. sorting Rule to sort the eigenvalues and eigenvectors. Supported values are SortRule::LargestMagn,SortRule::LargestReal,SortRule::LargestImag,SortRule::SmallestMagn,SortRule::SmallestRealandSortRule::SmallestImag, for exampleSortRule::LargestMagnindicates 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 parameterselection.
- Returns
- Number of converged eigenvalues.
◆ eigenvalues()
|
inline |
Returns the converged eigenvalues.
- Returns
- A complex-valued vector containing the eigenvalues. Returned vector type will be
Eigen::Vector<std::complex<Scalar>, ...>, depending on the template parameterScalardefined.
◆ eigenvectors()
|
inline |
Returns the eigenvectors associated with the converged eigenvalues.
- Parameters
-
nvec The number of eigenvectors to return.
- Returns
- A complex-valued matrix containing the eigenvectors. Returned matrix type will be
Eigen::Matrix<std::complex<Scalar>, ...>, depending on the template parameterScalardefined.
◆ info()
|
inline |
Returns the status of the computation.
The full list of enumeration values can be found in Enumerations.
◆ init() [1/2]
|
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.
◆ init() [2/2]
|
inline |
Initializes the solver by providing an initial residual vector.
- Parameters
-
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.
The documentation for this class was generated from the following file:
- /builds/uwsbel/chrono/src/chrono_thirdparty/spectra/Spectra/GenEigsBase.h