pymor.algorithms.eigs

Module Contents

pymor.algorithms.eigs.eigs(A, E=None, k=3, sigma=None, which='LM', b=None, l=None, maxiter=1000, tol=1e-13, imag_tol=1e-12, complex_pair_tol=1e-12, complex_evp=False, left_evp=False, seed=0)[source]

Approximate a few eigenvalues of a linear Operator.

Computes k eigenvalues w with corresponding eigenvectors v which solve the eigenvalue problem

\[A v_i = w_i v_i\]

or the generalized eigenvalue problem

\[A v_i = w_i E v_i\]

if E is not None.

The implementation is based on Algorithm 4.2 in [Leh95].

Parameters

A

The linear Operator for which the eigenvalues are to be computed.

E

The linear Operator which defines the generalized eigenvalue problem.

k

The number of eigenvalues and eigenvectors which are to be computed.

sigma

If not None transforms the eigenvalue problem such that the k eigenvalues closest to sigma are computed.

which

A string specifying which k eigenvalues and eigenvectors to compute:

  • 'LM': select eigenvalues with largest magnitude

  • 'SM': select eigenvalues with smallest magnitude

  • 'LR': select eigenvalues with largest real part

  • 'SR': select eigenvalues with smallest real part

  • 'LI': select eigenvalues with largest imaginary part

  • 'SI': select eigenvalues with smallest imaginary part

b

Initial vector for Arnoldi iteration. Default is a random vector.

l

The size of the Arnoldi factorization. Default is min(n - 1, max(2*k + 1, 20)).

maxiter

The maximum number of iterations.

tol

The relative error tolerance for the Ritz estimates.

imag_tol

Relative imaginary parts below this tolerance are set to 0.

complex_pair_tol

Tolerance for detecting pairs of complex conjugate eigenvalues.

complex_evp

Wether to consider an eigenvalue problem with complex operators. When operators are real setting this argument to False will increase stability and performance.

left_evp

If set to True compute left eigenvectors else compute right eigenvectors.

seed

Random seed which is used for computing the initial vector for the Arnoldi iteration.

Returns

w

A 1D NumPy array which contains the computed eigenvalues.

v

A VectorArray which contains the computed eigenvectors.