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, shifted_system_solver=None)[source]¶
Approximate a few eigenvalues of a linear
Operator.Computes
keigenvalueswwith corresponding eigenvectorsvwhich 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
Eis notNone.The implementation is based on Algorithm 4.2 in [Leh95].
- Parameters:
A – The linear
Operatorfor which the eigenvalues are to be computed.E – The linear
Operatorwhich defines the generalized eigenvalue problem.k – The number of eigenvalues and eigenvectors which are to be computed.
sigma – If not
Nonetransforms the eigenvalue problem such that the k eigenvalues closest to sigma are computed.which –
A string specifying which
keigenvalues 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 – Whether to consider an eigenvalue problem with complex operators. When operators are real setting this argument to
Falsewill increase stability and performance.left_evp – If set to
Truecompute left eigenvectors else compute right eigenvectors.shifted_system_solver – The
Solverto use ifsigmais notNone.
- Returns:
w – A 1D
NumPy arraywhich contains the computed eigenvalues.v – A
VectorArraywhich contains the computed eigenvectors.