pymor.algorithms.krylov

Module for computing (rational) Krylov subspaces’ bases.

Module Contents

pymor.algorithms.krylov.arnoldi(A, E, b, r)[source]

Block Arnoldi algorithm.

Computes an orthonormal basis for the Krylov subspace

\[\mathrm{span}\left\{ E^{-1} b, E^{-1} A E^{-1} b, {\left(E^{-1} A\right)}^2 E^{-1} b, \ldots, {\left(E^{-1} A\right)}^{r - 1} E^{-1} b, \right\}.\]

Parameters

A

The Operator A.

E

The Operator E. If None, the identity operator is assumed.

b

The VectorArray b.

r

Order of the Krylov subspace (positive integer).

Returns

V

Orthonormal basis for the Krylov subspace as a VectorArray with len(V) <= r*len(b) (strict inequality in case of deflation).

pymor.algorithms.krylov.rational_arnoldi(A, E, b, sigma, trans=False)[source]

Rational Arnoldi algorithm.

If trans == False, using Arnoldi process, computes a real orthonormal basis for the rational Krylov subspace

\[\mathrm{span}\{ (\sigma_1 E - A)^{-1} b, (\sigma_2 E - A)^{-1} b, \ldots, (\sigma_r E - A)^{-1} b \},\]

otherwise, computes the same for

\[\mathrm{span}\{ (\sigma_1 E - A)^{-T} b^T, (\sigma_2 E - A)^{-T} b^T, \ldots, (\sigma_r E - A)^{-T} b^T \}.\]

Interpolation points in sigma are allowed to repeat (in any order). Then, in the above expression,

\[\underbrace{ (\sigma_i E - A)^{-1} b, \ldots, (\sigma_i E - A)^{-1} b }_{m \text{ times}}\]

is replaced by

\[(\sigma_i E - A)^{-1} b, (\sigma_i E - A)^{-1} E (\sigma_i E - A)^{-1} b, \ldots, \left((\sigma_i E - A)^{-1} E\right)^{m - 1} (\sigma_i E - A)^{-1} b.\]

Analogously for the trans == True case.

Parameters

A

Real Operator A.

E

Real Operator E.

b

Real vector-like operator (if trans is False) or functional (if trans is True).

sigma

Sequence of interpolation points (closed under conjugation).

trans

Boolean, see above.

Returns

V

Orthonormal basis for the Krylov subspace as a VectorArray.

pymor.algorithms.krylov.tangential_rational_krylov(A, E, B, b, sigma, trans=False, orth=True)[source]

Tangential Rational Krylov subspace.

If trans == False, computes a real basis for the rational Krylov subspace

\[\mathrm{span}\{ (\sigma_1 E - A)^{-1} B b_1, (\sigma_2 E - A)^{-1} B b_2, \ldots, (\sigma_r E - A)^{-1} B b_r \},\]

otherwise, computes the same for

\[\mathrm{span}\{ (\sigma_1 E - A)^{-T} B^T b_1, (\sigma_2 E - A)^{-T} B^T b_2, \ldots, (\sigma_r E - A)^{-T} B^T b_r \}.\]

Interpolation points in sigma are assumed to be pairwise distinct.

Parameters

A

Real Operator A.

E

Real Operator E.

B

Real Operator B.

b
VectorArray from B.source, if trans == False, or

B.range, if trans == True.

sigma

Sequence of interpolation points (closed under conjugation), of the same length as b.

trans

Boolean, see above.

orth

If True, orthonormalizes the basis using pymor.algorithms.gram_schmidt.gram_schmidt.

Returns

V

Optionally orthonormal basis for the Krylov subspace as a VectorArray.