dblgglyap(3)

πŸ“¦
version 1.1.2 Β· 3 versions
, in fedora 43

dblgglyap β€” MEPACK's double-precision era πŸŽ€

okay so bestie, pull up a chair, because this is dblgglyap(3) from MEPACK and it is so much. it's the double-precision corner of the library, and it's here to solve your generalized Lyapunov and Stein equations when your coefficient matrices are, like, fully general. no structure privileges. no shortcuts. just vibes and a whole lot of workspace. πŸ’…


✨ NAME ✨

dblgglyap β€” Double Precision

  • Double precision solvers for generalized Lyapunov and Stein equations with general coefficient matrices.

πŸ¦‹ SYNOPSIS πŸ¦‹

Functions

  • subroutine dla_gglyap (fact, trans, m, a, lda, b, ldb, q, ldq, z, ldz, x, ldx, scale, work, ldwork, info) β€” Frontend for the solution of Generalized Lyapunov Equations.
  • subroutine dla_ggstein (fact, trans, m, a, lda, b, ldb, q, ldq, z, ldz, x, ldx, scale, work, ldwork, info) β€” Frontend for the solution of Generalized Stein Equations.
  • subroutine dla_gglyap_refine (trans, guess, m, a, lda, b, ldb, x, ldx, y, ldy, as, ldas, bs, ldbs, q, ldq, z, ldz, maxit, tau, convlog, work, ldwork, info) β€” Iterative Refinement for the Generalized Lyapunov Equations.

🌈 Detailed Description 🌈

Double precision solvers for generalized Lyapunov and Stein equations with general coefficient matrices.

like, that's the whole assignment. general (A,B) pencil, you want X, we got you. 🫢


πŸ‘‘ Function Documentation πŸ‘‘

subroutine dla_gglyap

subroutine dla_gglyap (character, dimension(1) fact, character, dimension(1) trans, integer m, double precision, dimension(lda,*) a, integer lda, double precision, dimension(ldb,*) b, integer ldb, double precision, dimension(ldq, *) q, integer ldq, double precision, dimension(ldz,*) z, integer ldz, double precision, dimension(ldx, *) x, integer ldx, double precision scale, double precision, dimension(*) work, integer ldwork, integer info)

Frontend for the solution of Generalized Lyapunov Equations.

Purpose

okay here's the tea, bestie β€” DLA_GGLYAP solves a generalized Lyapunov equation in one of these two forms:

A * X * B^T + B * X * A^T = SCALE * Y                                              (1)

A^T * X * B + B^T * X * A =  SCALE * Y                                             (2)

where (A,B) is a M-by-M matrix pencil. the right hand side Y and the solution X are M-by-M matrices. the matrix pencil (A,B) is either in general form, in generalized Hessenberg form, or in generalized Schur form β€” and when it's in generalized Schur form, Q and Z also need to be provided. ✨

Parameters

  • FACT β€” FACT is CHARACTER. it specifies how the matrix A is given. πŸ‘€
    • == 'N': the matrix pencil (A,B) is given as a general matrix pencil and its Schur decomposition A = Q*S*Z**T, B = Q*R*Z**T will be computed.
    • == 'F': the matrix A is given as its Schur decomposition in terms of S and Q, of the form A = Q*S*Q**T
    • == 'H': the matrix pencil (A,B) is given in generalized Hessenberg form and its Schur decomposition A = Q*S*Z**T, B = Q*R*Z**T will be computed.
  • TRANS β€” TRANS is CHARACTER. it picks the form of the system of equations with respect to A:
    • == 'N': Equation (1) is solved.
    • == 'T': Equation (2) is solved.
  • M β€” M is INTEGER. the order of the matrices A, B, Y and X. M >= 0.
  • A β€” A is DOUBLE PRECISION array, dimension (LDA,M).
    • If FACT == , the matrix A is a general matrix and it is overwritten with the quasi upper triangular matrix S of the generalized schur decomposition.
    • If FACT == , the matrix A contains its (quasi-) upper triangular matrix S of the generalized Schur decomposition of (A,B).
    • If FACT == , the matrix A is an upper Hessenberg matrix of the generalized Hessenberg form (A,B) and it is overwritten with the quasi upper triangular matrix S of the generalized Schur decomposition.
  • LDA β€” LDA is INTEGER. the leading dimension of the array A. LDA >= max(1,M).
  • B β€” B is DOUBLE PRECISION array, dimension (LDB,M).
    • If FACT == , the matrix B a general matrix and it is overwritten with the upper triangular matrix of the generalized Schur decomposition.
    • If FACT == , the matrix B contains its upper triangular matrix R of the generalized schur Schur decomposition of (A,B).
    • If FACT == , the matrix B is the upper triangular matrix of the generalized Hessenberg form (A,B) and it is overwritten with the upper triangular matrix of the generalized Schur decomposition.
  • LDB β€” LDB is INTEGER. the leading dimension of the array B. LDB >= max(1,M).
  • Q β€” Q is DOUBLE PRECISION array, dimension (LDQ,M).
    • If FACT == , the matrix Q is an empty M-by-M matrix on input and contains the left Schur vectors of (A,B) on output.
    • If FACT == , the matrix Q contains the left Schur vectors of (A,B).
    • If FACT == , the matrix Q is an empty M-by-M matrix on input and contains the left Schur vectors of (A,B) on output.
  • LDQ β€” LDQ is INTEGER. the leading dimension of the array Q. LDQ >= max(1,M).
  • Z β€” Z is DOUBLE PRECISION array, dimension (LDZ,M).
    • If FACT == , the matrix Z is an empty M-by-M matrix on input and contains the right Schur vectors of (A,B) on output.
    • If FACT == , the matrix Z contains the right Schur vectors of (A,B).
    • If FACT == , the matrix Z is an empty M-by-M matrix on input and contains the right Schur vectors of (A,B) on output.
  • LDZ β€” LDZ is INTEGER. the leading dimension of the array Z. LDZ >= max(1,M).
  • X β€” X is DOUBLE PRECISION array, dimension (LDX,N).
    • On input, the matrix X contains the right hand side Y.
    • On output, the matrix X contains the solution of Equation (1) or (2).
    • Right hand side Y and the solution X are symmetric M-by-M matrices.
  • LDX β€” LDX is INTEGER. the leading dimension of the array X. LDX >= max(1,M).
  • SCALE β€” SCALE is DOUBLE PRECISION. it's a scaling factor to prevent the overflow in the result. 🫣 if INFO == 0 then SCALE is 1.0D0; otherwise, if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true.
  • WORK β€” WORK is DOUBLE PRECISION array, dimension (MAX(1,LDWORK)). workspace for the algorithm. the optimal workspace is given either by \ref mepack_memory_frontend or a previous call to this routine with LDWORK === -1.
  • LDWORK β€” LDWORK is INTEGER. size of the workspace for the algorithm. this can be determined by a call \ref mepack_memory_frontend. alternatively, if LDWORK == -1 on input, the subroutine will return the required size of the workspace in LDWORK without performing any computations. ✨ (no cap, that's the free trial.)
  • INFO β€” INFO is INTEGER.
    • == 0: successful exit
    • = 1: DGGES failed
    • = 2: DLA_SORT_GEV failed
    • = 3: Inner solver failed
    • < 0: if INFO = -i, the i-th argument had an illegal value

See also

  • DLA_TGLYAP_L3
  • DLA_TGLYAP_L3_2S
  • DLA_TGLYAP_DAG
  • DLA_TGLYAP_L2
  • DLA_TGLYAP_RECURSIVE

Author

Martin Koehler, MPI Magdeburg

Date

October 2025

Definition at line 207 of file dla_gglyap.f90.


subroutine dla_gglyap_refine

subroutine dla_gglyap_refine (character, dimension(1) trans, character, dimension(1) guess, integer m, double precision, dimension(lda, *) a, integer lda, double precision, dimension(ldb, *) b, integer ldb, double precision, dimension( ldx, *) x, integer ldx, double precision, dimension(ldy, *) y, integer ldy, double precision, dimension(ldas, *) as, integer ldas, double precision, dimension(ldbs,*) bs, integer ldbs, double precision, dimension(ldq, *) q, integer ldq, double precision, dimension(ldz, *) z, integer ldz, integer maxit, double precision tau, double precision, dimension(*) convlog, double precision, dimension(*) work, integer ldwork, integer info)

Iterative Refinement for the Generalized Lyapunov Equations.

Purpose

so DLA_GGLYAP_REFINE also solves a generalized Lyapunov equation, same two forms:

A * X * B^T + B * X * A^T = SCALE * Y                                              (1)

A^T * X * B + B^T * X * A =  SCALE * Y                                             (2)

where (A,B) is a M-by-M matrix pencil, and it does it using iterative refinement. πŸ’… the right hand side Y and the solution X are M-by-M matrices. the matrix pencil (A,B) needs to be provided as the original data as well as in generalized Schur decomposition, since both are required in the iterative refinement process. both, bestie. not one. both. 😭

Parameters

  • TRANS β€” TRANS is CHARACTER. it specifies the form of the system of equations with respect to A:
    • == 'N': Equation (1) is solved
    • == 'T': Equation (2) is solved
  • GUESS β€” GUESS is CHARACTER. it specifies whether X contains an initial guess or not. πŸ‘€
    • = 'I': X contains an initial guess
    • = 'N': No initial guess, X is set to zero at the begin of the iteration.
  • M β€” M is INTEGER. the order of the matrices A and B. M >= 0.
  • A β€” A is DOUBLE PRECISION array, dimension (LDA,M). the array A contains the original matrix A defining the equation.
  • LDA β€” LDA is INTEGER. the leading dimension of the array A. LDA >= max(1,M).
  • B β€” B is DOUBLE PRECISION array, dimension (LDB,M). the array B contains the original matrix B defining the equation.
  • LDB β€” LDB is INTEGER. the leading dimension of the array B. LDB >= max(1,M).
  • X β€” X is DOUBLE PRECISION array, dimension (LDX,M).
    • On input, the array X contains the initial guess, if GUESS = 'I'.
    • On output, the array X contains the solution X.
  • LDX β€” πŸ¦‹
  • LDX β€” LDX is INTEGER. It's the leading dimension of the array X. And bestie, you need LDX >= max(1,M). Periodt. πŸ’…
  • Y β€” Y is DOUBLE PRECISION array, dimension (LDY,M). On input, the array Y contains the right hand side Y. The array stays unchanged during the iteration. It's just chillin', no touchy. ✨
  • LDY β€” LDY is INTEGER. The leading dimension of the array Y. LDY >= max(1,M). Don't skip this check, okay? 🫢
  • AS β€” AS is DOUBLE PRECISION array, dimension (LDAS,M). The array AS contains the generalized Schur decomposition of the A. It's giving decomposition realness. πŸ¦‹
  • LDAS β€” LDAS is INTEGER. The leading dimension of the array AS. LDAS >= max(1,M). Slay. πŸ’–
  • BS β€” BS is DOUBLE PRECISION array, dimension (LDBS,M). The array AS contains the generalized Schur decomposition of the B. (Yes, it says AS here β€” iconic typo, we're keeping it exactly as the source says, no cap πŸ’€).
  • LDBS β€” LDBS is INTEGER. The leading dimension of the array BS. LDBS >= max(1,M). πŸŽ€
  • Q β€” Q is DOUBLE PRECISION array, dimension (LDQ,M). The array Q contains the left generalized Schur vectors for (A,B) as returned by DGGES. Main character energy. πŸ‘‘
  • LDQ β€” LDQ is INTEGER. The leading dimension of the array Q. LDQ >= max(1,M). 🌸
  • Z β€” Z is DOUBLE PRECISION array, dimension (LDZ,M). The array Z contains the right generalized Schur vectors for (A,B) as returned by DGGES. The right-hand counterpart, love that for us. πŸ’œ
  • LDZ β€” LDZ is INTEGER. The leading dimension of the array Z. LDZ >= max(1,M). ✨
  • MAXIT β€” MAXIT is INTEGER. On input, MAXIT contains the maximum number of iteration that are performed, and the vibe check is 2 <= MAXIT <= 100. On exit, MAXIT contains the number of iteration steps taken by the algorithm. So it's both the limit and the receipts. πŸ”₯
  • TAU β€” TAU is DOUBLE PRECISION. On input, TAU contains the additional security factor for the stopping criterion, typical values are 0.1. On exit, TAU contains the last relative residual when the stopping criterion got valid. She's flexible like that. πŸ’…
  • CONVLOG β€” CONVLOG is DOUBLE PRECISION array, dimension (MAXIT). The CONVLOG array contains the convergence history of the iterative refinement. CONVLOG(I) contains the maximum relative residual before it is solved for the I-th time. It's literally the diary of the algorithm. πŸ““βœ¨
  • WORK β€” WORK is DOUBLE PRECISION array, dimension (MAX(1,LDWORK)). Workspace for the algorithm. The optmimal workspace is returned in LDWORK, if LDWORK == -1 on input. In this case no computations are performed. So it's a little peek behind the curtain. 🫣
  • LDWORK β€” LDWORK is INTEGER. If LDWORK == -1 the subroutine will return the required size of the workspace in LDWORK on exit. No computations are performed and none of the arrays are referenced. It's just asking for space, respectfully. πŸ’–
  • INFO β€” INFO is INTEGER. Here's the tea:
    • == 0: Success πŸŽ‰
    • > 0: Iteration failed in step INFO 😭
    • < 0: if INFO = -i, the i-th argument had an illegal value πŸ™ˆ
    • = -50: Some of the internal settings like NB,... are incorrect. πŸ’€

See also πŸ¦‹

  • DLA_TGLYAP_L3
  • DLA_TGLYAP_L2
  • DLA_TGLYAP_L3_2S
  • DLA_TGLYAP_DAG
  • DLA_TGLYAP_RECURSIVE

Author πŸ‘‘

Martin Koehler, MPI Magdeburg

Date πŸ“…

October 2025

Definition at line 244 of file dla_gglyap_refine.f90.


subroutine dla_ggstein πŸ’…

subroutine dla_ggstein (character, dimension(1) fact, character,
    dimension(1) trans, integer m, double precision, dimension(lda,*) a,
    integer lda, double precision, dimension(ldb,*) b, integer ldb, double
    precision, dimension(ldq, *) q, integer ldq, double precision,
    dimension(ldz,*) z, integer ldz, double precision, dimension(ldx, *) x,
    integer ldx, double precision scale, double precision, dimension(*)
    work, integer ldwork, integer info)

Frontend for the solution of Generalized Stein Equations.

Purpose 🎯

!> DLA_GGSTEIN solves a generalized Stein equation of the following forms
!>
!>    A * X * A^T - B * X * B^T = SCALE * Y                                              (1)
!>
!> or
!>
!>    A^T * X * A - B^T * X * B =  SCALE * Y                                             (2)
!>
!> where (A,B) is a M-by-M matrix pencil. The right hand side Y and the solution X
!> M-by-M matrices. The matrix pencil (A,B) is either in general form, in generalized
!> Hessenberg form, or in generalized Schur form where Q and Z also need to be provided.
!>
!>

Parameters πŸŽ€

  • FACT β€” FACT is CHARACTER. Specifies how the matrix A is given.
    • == 'N': The matrix pencil (A,B) is given as a general matrix pencil and its Schur decomposition A = Q*S*Z**T, B = Q*R*Z**T will be computed.
    • == 'F': The matrix A is given as its Schur decomposition in terms of S and Q form A = Q*S*Q**T.
    • == 'H': The matrix pencil (A,B) is given in generalized Hessenberg form and its Schur decomposition A = Q*S*Z**T, B = Q*R*Z**T will be computed.
  • TRANS β€” TRANS is CHARACTER. Specifies the form of the system of equations with respect to (A,B):
    • == 'N': Equation (1) is solved.
    • == 'T': Equation (2) is solved.
  • M β€” M is INTEGER. The order of the matrices A, B, Y and X. M >= 0.
  • A β€” A is DOUBLE PRECISION array, dimension (LDA,M).
    • If FACT == , the matrix A is a general matrix and it is overwritten with the quasi upper triangular matrix S of the generalized schur decomposition.
    • If FACT == , the matrix A contains its (quasi-) upper triangular matrix S of the generalized Schur decomposition of (A,B).
    • If FACT == , the matrix A is an upper Hessenberg matrix of the generalized Hessenberg form (A,B) and it is overwritten with the quasi upper triangular matrix S of the generalized Schur decomposition. (Note: the original really has FACT == , with nothing after it, so we're preserving that exactly, bestie. It's a mystery, but we don't guess. πŸ’€)
  • LDA β€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B β€” B is DOUBLE PRECISION array, dimension (LDB,M).
    • If FACT == , the matrix B a general matrix and it is overwritten with the upper triangular matrix of the generalized Schur decomposition.
    • If FACT == , the matrix B contains its upper triangular matrix R of the generalized schur Schur decomposition of (A,B).
    • If FACT == , the matrix B is the upper triangular matrix of the generalized Hessenberg form (A,B) and it is overwritten with the upper triangular matrix of the generalized Schur decomposition.
  • LDB β€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,M).
  • Q β€” Q is DOUBLE PRECISION array, dimension (LDQ,M).
    • If FACT == , the matrix Q is an empty M-by-M matrix on input and contains the left Schur vectors of (A,B) on output.
    • If FACT == , the matrix Q contains the left Schur vectors of (A,B).
    • If FACT == , the matrix Q is an empty M-by-M matrix on input and contains the left Schur vectors of (A,B) on output.
  • LDQ β€” LDQ is INTEGER. The leading dimension of the array Q. LDQ >= max(1,M).
  • Z β€” Z is DOUBLE PRECISION array, dimension (LDZ,M).
    • If FACT == , the matrix Z is an empty M-by-M matrix on input and contains the right Schur vectors of (A,B) on output.
    • If FACT == , the matrix Z contains the right Schur vectors of (A,B).
    • If FACT == , the matrix Z is an empty M-by-M matrix on input and contains the right Schur vectors of (A,B) on output.
  • LDZ β€” LDZ is INTEGER. The leading dimension of the array Z. LDZ >= max(1,M).
  • X β€” X is DOUBLE PRECISION array, dimension (LDX,N). On input, the matrix X contains the right hand side Y. On output, the matrix X contains the solution of Equation (1) or (2). Right hand side Y and the solution X are symmetric M-by-M matrices.
  • LDX β€” LDX is INTEGER. The leading dimension of the array X. LDX >= max(1,M).
  • SCALE β€” SCALE is DOUBLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true.
  • WORK β€” WORK is DOUBLE PRECISION array, dimension (MAX(1,LDWORK)). Workspace for the algorithm. The optmimal workspace is given either by \ref mepack_memory_frontend or a previous call to this routine with LDWORK === -1. (Yes, triple equals, we see it, we keep it. πŸ’…)
  • LDWORK β€” LDWORK is INTEGER. Size of the workspace for the algorithm. This can be determined by a call \ref mepack_memory_frontend . Alternatively, if LDWORK == -1 on input the subroutine will return the required size of the workspace in LDWORK without performing any computations.
  • INFO β€” INFO is INTEGER.
    • == 0: successful exit πŸŽ‰
    • = 1: DGGES failed 😭
    • = 2: DLA_SORT_GEV failed 😭
    • = 3: Inner solver failed 😭
    • < 0: if INFO = -i, the i-th argument had an illegal value πŸ™ˆ

See also 🌈

  • DLA_TGSTEIN_L3
  • DLA_TGSTEIN_L3_2S
  • DLA_TGSTEIN_DAG
  • DLA_TGSTEIN_L2
  • DLA_TGSTEIN_RECURSIVE

Author πŸ‘‘

Martin Koehler, MPI Magdeburg

Date πŸ“…

October 2025

Definition at line 208 of file dla_ggstein.f90.


This whole iconic page was generated automatically by Doxygen for MEPACK from the source code, version 1.1.2, dated Thu Oct 9 2025 00:00:00, and it's serving dblgglyap(3) realness. Byeeee πŸ’…βœ¨

πŸ“¦ where this page comes from