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.PositiveRiccatiSolverLRCompute an approximate low-rank factor of the solution of a
PositiveRiccatiEquation.Calls
pymor.solvers.matrix_equations.radi.RADIRiccatiSolverwith flipped signs in theRorQterms (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
Solverfor 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.RiccatiSolverLRCompute 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
Solverfor 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
Computes a rank-truncated \(LDL^T\) factorization.
Compute further shift parameters for low-rank RADI iteration.
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
VectorArrayrepresenting the left factor in the \(LDL^\top\) facorization.D – The
NumPy arrayrepresenting the core factor.tol – The relative truncation tolerance.
- Returns:
hL – The
VectorArrayhL representing the left factor in the \(LDL^\top\) rank-truncated facorization.hD – The
NumPy arrayrepresenting 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
OperatorA from the corresponding Riccati equation.E – The
OperatorE from the corresponding Riccati equation.B – The
VectorArrayB from the corresponding Riccati equation.Rinv – The matrix \(R^{-1}\) as a
NumPy arrayfrom the correspondingRiccatiEquation.RF – A
VectorArrayrepresenting the currently computed residual factor.RC – A
NumPy arrayrepresenting the currently computed residual core.K – A
VectorArrayrepresenting the currently computed iterate before multiplication by \(R^{-1}\).Z – A
VectorArrayrepresenting the currently computed solution factor.
- Returns:
shifts – A
NumPy arraycontaining 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:
A – The
OperatorA from the correspondingRiccatiEquation.E – The
OperatorE from the correspondingRiccatiEquation.B – The
VectorArrayB from the correspondingRiccatiEquation.C – The
VectorArrayC from the correspondingRiccatiEquation.Rinv – The matrix \(R^{-1}\) as a
NumPy arrayfrom the correspondingRiccatiEquation.Q – The matrix \(Q\) as a
NumPy arrayfrom the correspondingRiccatiEquation.
- Returns:
shifts – A
NumPy arraycontaining a set of stable shift parameters.