pymor.solvers.matrix_equations.radi

Module Contents

class pymor.solvers.matrix_equations.radi.RADIPositiveRiccatiSolver(radi_tol=1e-10, radi_maxiter=500, radi_shifts='hamiltonian_shifts', shifted_system_solver=None, hamiltonian_shifts_init_maxiter=20, hamiltonian_shifts_subspace_columns=6)[source]

Bases: pymor.solvers.matrix_equations.interface.PositiveRiccatiSolverLR

Compute an approximate low-rank factor of the solution of a PositiveRiccatiEquation.

Calls pymor.solvers.matrix_equations.radi.RADIRiccatiSolver with flipped signs in the R or Q terms (depending whether the transposed version is solved or not).

Parameters:
  • radi_tol – Convergence tolerance for the RADI iteration.

  • radi_maxiter – Maximum number of RADI steps. A real shift counts as one step, a complex-conjugate shift pair as two.

  • radi_shifts – Strategy for computing the RADI shift parameters. Currently only 'hamiltonian_shifts' is supported.

  • shifted_system_solver – The Solver for the shifted systems.

  • hamiltonian_shifts_init_maxiter – Maximum number of attempts to generate stable initial shifts before an error is raised. See pymor.solvers.matrix_equations.radi.RADIRiccatiSolver.hamiltonian_shifts_init.

  • hamiltonian_shifts_subspace_columns – Number of trailing columns of the solution factor \(Z\) used to span the Galerkin subspace for the subsequent shifts. See pymor.solvers.matrix_equations.radi.RADIRiccatiSolver.hamiltonian_shifts.

class pymor.solvers.matrix_equations.radi.RADIRiccatiSolver(radi_tol=1e-10, radi_maxiter=500, radi_shifts='hamiltonian_shifts', shifted_system_solver=None, hamiltonian_shifts_init_maxiter=20, hamiltonian_shifts_subspace_columns=6)[source]

Bases: pymor.solvers.matrix_equations.interface.RiccatiSolverLR

Compute an approximate low-rank factor of the solution of a RiccatiEquation.

This is an implementation of Algorithm 2 in [BBujanovicKurschnerS18].

Parameters:
  • radi_tol – Convergence tolerance for the RADI iteration.

  • radi_maxiter – Maximum number of RADI steps. A real shift counts as one step, a complex-conjugate shift pair as two.

  • radi_shifts – Strategy for computing the RADI shift parameters. Currently only 'hamiltonian_shifts' is supported.

  • shifted_system_solver – The Solver for the shifted systems.

  • hamiltonian_shifts_init_maxiter – Maximum number of attempts to generate stable initial shifts before an error is raised. See hamiltonian_shifts_init.

  • hamiltonian_shifts_subspace_columns – Number of trailing columns of the solution factor \(Z\) used to span the Galerkin subspace for the subsequent shifts. See hamiltonian_shifts.

Methods

LDL_T_rank_truncation

Computes a rank-truncated \(LDL^T\) factorization.

hamiltonian_shifts

Compute further shift parameters for low-rank RADI iteration.

hamiltonian_shifts_init

Compute initial shift parameters for low-rank RADI iteration.

LDL_T_rank_truncation(L, D, tol=np.finfo(float).eps)[source]

Computes a rank-truncated \(LDL^T\) factorization.

Computes the QR factorization of \(L = QR\) followed by an eigendecomposition of :math:’RDR^T’ and a rank decision based on the absolute values of the computed eigenvalues. The truncated core matrix is the diagonal matrix of preserved eigenvalues and the truncated \(L\) is computed as \(Q\) times the preserved (left) eingenvectors.

Parameters:
  • L – The VectorArray representing the left factor in the \(LDL^\top\) facorization.

  • D – The NumPy array representing the core factor.

  • tol – The relative truncation tolerance.

Returns:

  • hL – The VectorArray hL representing the left factor in the \(LDL^\top\) rank-truncated facorization.

  • hD – The NumPy array representing the core factor.

hamiltonian_shifts(A, E, B, Rinv, RF, RC, K, Z)[source]

Compute further shift parameters for low-rank RADI iteration.

Compute Galerkin projection of Hamiltonian matrix on space spanned by last few columns of \(Z\) and return the eigenvalue of the projected Hamiltonian with the most impact on convergence as the next shift parameter.

See [BBujanovicKurschnerS18], pp. 318-321.

Parameters:
  • A – The Operator A from the corresponding Riccati equation.

  • E – The Operator E from the corresponding Riccati equation.

  • B – The VectorArray B from the corresponding Riccati equation.

  • Rinv – The matrix \(R^{-1}\) as a NumPy array from the corresponding RiccatiEquation.

  • RF – A VectorArray representing the currently computed residual factor.

  • RC – A NumPy array representing the currently computed residual core.

  • K – A VectorArray representing the currently computed iterate before multiplication by \(R^{-1}\).

  • Z – A VectorArray representing the currently computed solution factor.

Returns:

shifts – A NumPy array containing a set of stable shift parameters.

hamiltonian_shifts_init(A, E, B, C, Rinv, Q)[source]

Compute initial shift parameters for low-rank RADI iteration.

Compute Galerkin projection of Hamiltonian matrix on space spanned by \(C\) and return the eigenvalue of the projected Hamiltonian with the most impact on convergence as the next shift parameter.

See [BBujanovicKurschnerS18], pp. 318-321.

Parameters:
Returns:

shifts – A NumPy array containing a set of stable shift parameters.