chrono::ChKrylovSchurEig Class Reference

Description

Krylov-Schur method for the eigenvalues of largest magnitude of a linear operator.

The operator A is given only through the products A*x (see Operator). The method finds the eigenvalues of A with the largest magnitude, and their eigenvectors, in complex arithmetic. Applied to the shift-and-invert operator of a generalized eigenvalue problem (see ShiftInvertOperator), it finds the eigenvalues of that problem closest to the shift. See G. W. Stewart, "A Krylov-Schur algorithm for large eigenproblems", SIAM J. Matrix Anal. Appl. 23(3):601-614, 2001.

#include <ChKrylovSchurEig.h>

Classes

class  Operator
 Interface for the linear operator whose eigenvalues are computed. More...
 
class  ShiftInvertOperator
 Shift-and-invert operator of a generalized eigenvalue problem with sparse matrices and a complex shift. More...
 

Public Member Functions

void SetMaxIterations (int max_iterations)
 Set the maximum number of iterations (restarts) of the method (default: 500).
 
void SetTolerance (double tolerance)
 Set the convergence tolerance, relative to the magnitude of each eigenvalue (default: 1e-6).
 
bool Solve (Operator &op, const ChVectorDynamic< std::complex< double >> &v0, int num_eigs, int subspace_size, ChMatrixDynamic< std::complex< double >> &eigvects, ChVectorDynamic< std::complex< double >> &eigvals)
 Compute the eigenvalues of largest magnitude of the operator, and their eigenvectors. More...
 
int GetNumConverged () const
 Get the number of converged eigenvalues in the last call to Solve().
 
int GetNumIterations () const
 Get the number of iterations (restarts) used in the last call to Solve().
 

Member Function Documentation

◆ Solve()

bool chrono::ChKrylovSchurEig::Solve ( Operator &  op,
const ChVectorDynamic< std::complex< double >> &  v0,
int  num_eigs,
int  subspace_size,
ChMatrixDynamic< std::complex< double >> &  eigvects,
ChVectorDynamic< std::complex< double >> &  eigvals 
)

Compute the eigenvalues of largest magnitude of the operator, and their eigenvectors.

The size of the problem is the size of v0. Only the converged eigenpairs are returned, GetNumConverged() of them (num_eigs if the method converged). Returns true if all requested eigenvalues converged.

Parameters
opoperator A
v0start vector of the Krylov subspace (e.g., random)
num_eigsnumber of requested eigenvalues
subspace_sizelargest dimension of the Krylov subspace
eigvectseigenvectors, as columns (resized)
eigvalseigenvalues (resized)

The documentation for this class was generated from the following files:
  • /builds/uwsbel/chrono/src/chrono/solver/ChKrylovSchurEig.h
  • /builds/uwsbel/chrono/src/chrono/solver/ChKrylovSchurEig.cpp