dblgglyap(3)
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βFACTisCHARACTER. it specifies how the matrixAis given. π== 'N': the matrix pencil(A,B)is given as a general matrix pencil and its Schur decompositionA = Q*S*Z**T,B = Q*R*Z**Twill be computed.== 'F': the matrix A is given as its Schur decomposition in terms of S and Q, of the formA = Q*S*Q**T== 'H': the matrix pencil(A,B)is given in generalized Hessenberg form and its Schur decompositionA = Q*S*Z**T,B = Q*R*Z**Twill be computed.
TRANSβTRANSisCHARACTER. it picks the form of the system of equations with respect toA:== 'N': Equation (1) is solved.== 'T': Equation (2) is solved.
MβMisINTEGER. the order of the matricesA,B,YandX.M >= 0.AβAisDOUBLE PRECISIONarray, dimension(LDA,M).- If
FACT ==, the matrixAis a general matrix and it is overwritten with the quasi upper triangular matrixSof the generalized schur decomposition. - If
FACT ==, the matrixAcontains its (quasi-) upper triangular matrixSof the generalized Schur decomposition of(A,B). - If
FACT ==, the matrixAis an upper Hessenberg matrix of the generalized Hessenberg form(A,B)and it is overwritten with the quasi upper triangular matrixSof the generalized Schur decomposition.
- If
LDAβLDAisINTEGER. the leading dimension of the arrayA.LDA >= max(1,M).BβBisDOUBLE PRECISIONarray, dimension(LDB,M).- If
FACT ==, the matrixBa general matrix and it is overwritten with the upper triangular matrix of the generalized Schur decomposition. - If
FACT ==, the matrixBcontains its upper triangular matrixRof the generalized schur Schur decomposition of(A,B). - If
FACT ==, the matrixBis 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.
- If
LDBβLDBisINTEGER. the leading dimension of the arrayB.LDB >= max(1,M).QβQisDOUBLE PRECISIONarray, dimension(LDQ,M).- If
FACT ==, the matrixQis an empty M-by-M matrix on input and contains the left Schur vectors of(A,B)on output. - If
FACT ==, the matrixQcontains the left Schur vectors of(A,B). - If
FACT ==, the matrixQis an empty M-by-M matrix on input and contains the left Schur vectors of(A,B)on output.
- If
LDQβLDQisINTEGER. the leading dimension of the arrayQ.LDQ >= max(1,M).ZβZisDOUBLE PRECISIONarray, dimension(LDZ,M).- If
FACT ==, the matrixZis an empty M-by-M matrix on input and contains the right Schur vectors of(A,B)on output. - If
FACT ==, the matrixZcontains the right Schur vectors of(A,B). - If
FACT ==, the matrixZis an empty M-by-M matrix on input and contains the right Schur vectors of(A,B)on output.
- If
LDZβLDZisINTEGER. the leading dimension of the arrayZ.LDZ >= max(1,M).XβXisDOUBLE PRECISIONarray, dimension(LDX,N).- On input, the matrix
Xcontains the right hand sideY. - On output, the matrix
Xcontains the solution of Equation (1) or (2). - Right hand side
Yand the solutionXare symmetric M-by-M matrices.
- On input, the matrix
LDXβLDXisINTEGER. the leading dimension of the arrayX.LDX >= max(1,M).SCALEβSCALEisDOUBLE PRECISION. it's a scaling factor to prevent the overflow in the result. π«£ ifINFO == 0thenSCALEis1.0D0; otherwise, if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true.WORKβWORKisDOUBLE PRECISIONarray, dimension(MAX(1,LDWORK)). workspace for the algorithm. the optimal workspace is given either by\ref mepack_memory_frontendor a previous call to this routine withLDWORK === -1.LDWORKβLDWORKisINTEGER. size of the workspace for the algorithm. this can be determined by a call\ref mepack_memory_frontend. alternatively, ifLDWORK == -1on input, the subroutine will return the required size of the workspace inLDWORKwithout performing any computations. β¨ (no cap, that's the free trial.)INFOβINFOisINTEGER.== 0: successful exit= 1:DGGESfailed= 2:DLA_SORT_GEVfailed= 3: Inner solver failed< 0: ifINFO = -i, the i-th argument had an illegal value
See also
DLA_TGLYAP_L3DLA_TGLYAP_L3_2SDLA_TGLYAP_DAGDLA_TGLYAP_L2DLA_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βTRANSisCHARACTER. it specifies the form of the system of equations with respect toA:== 'N': Equation (1) is solved== 'T': Equation (2) is solved
GUESSβGUESSisCHARACTER. it specifies whetherXcontains an initial guess or not. π= 'I':Xcontains an initial guess= 'N': No initial guess,Xis set to zero at the begin of the iteration.
MβMisINTEGER. the order of the matricesAandB.M >= 0.AβAisDOUBLE PRECISIONarray, dimension(LDA,M). the arrayAcontains the original matrixAdefining the equation.LDAβLDAisINTEGER. the leading dimension of the arrayA.LDA >= max(1,M).BβBisDOUBLE PRECISIONarray, dimension(LDB,M). the arrayBcontains the original matrixBdefining the equation.LDBβLDBisINTEGER. the leading dimension of the arrayB.LDB >= max(1,M).XβXisDOUBLE PRECISIONarray, dimension(LDX,M).- On input, the array
Xcontains the initial guess, ifGUESS = 'I'. - On output, the array
Xcontains the solutionX.
- On input, the array
LDXβ π¦LDXβLDXisINTEGER. It's the leading dimension of the arrayX. And bestie, you needLDX >= max(1,M). Periodt. πYβYisDOUBLE PRECISIONarray, dimension(LDY,M). On input, the arrayYcontains the right hand sideY. The array stays unchanged during the iteration. It's just chillin', no touchy. β¨LDYβLDYisINTEGER. The leading dimension of the arrayY.LDY >= max(1,M). Don't skip this check, okay? π«ΆASβASisDOUBLE PRECISIONarray, dimension(LDAS,M). The arrayAScontains the generalized Schur decomposition of theA. It's giving decomposition realness. π¦LDASβLDASisINTEGER. The leading dimension of the arrayAS.LDAS >= max(1,M). Slay. πBSβBSisDOUBLE PRECISIONarray, dimension(LDBS,M). The arrayAScontains the generalized Schur decomposition of theB. (Yes, it saysAShere β iconic typo, we're keeping it exactly as the source says, no cap π).LDBSβLDBSisINTEGER. The leading dimension of the arrayBS.LDBS >= max(1,M). πQβQisDOUBLE PRECISIONarray, dimension(LDQ,M). The arrayQcontains the left generalized Schur vectors for(A,B)as returned byDGGES. Main character energy. πLDQβLDQisINTEGER. The leading dimension of the arrayQ.LDQ >= max(1,M). πΈZβZisDOUBLE PRECISIONarray, dimension(LDZ,M). The arrayZcontains the right generalized Schur vectors for(A,B)as returned byDGGES. The right-hand counterpart, love that for us. πLDZβLDZisINTEGER. The leading dimension of the arrayZ.LDZ >= max(1,M). β¨MAXITβMAXITisINTEGER. On input,MAXITcontains the maximum number of iteration that are performed, and the vibe check is2 <= MAXIT <= 100. On exit,MAXITcontains the number of iteration steps taken by the algorithm. So it's both the limit and the receipts. π₯TAUβTAUisDOUBLE PRECISION. On input,TAUcontains the additional security factor for the stopping criterion, typical values are0.1. On exit,TAUcontains the last relative residual when the stopping criterion got valid. She's flexible like that. πCONVLOGβCONVLOGisDOUBLE PRECISIONarray, dimension(MAXIT). TheCONVLOGarray contains the convergence history of the iterative refinement.CONVLOG(I)contains the maximum relative residual before it is solved for theI-th time. It's literally the diary of the algorithm. πβ¨WORKβWORKisDOUBLE PRECISIONarray, dimension(MAX(1,LDWORK)). Workspace for the algorithm. The optmimal workspace is returned inLDWORK, ifLDWORK == -1on input. In this case no computations are performed. So it's a little peek behind the curtain. π«£LDWORKβLDWORKisINTEGER. IfLDWORK == -1the subroutine will return the required size of the workspace inLDWORKon exit. No computations are performed and none of the arrays are referenced. It's just asking for space, respectfully. πINFOβINFOisINTEGER. Here's the tea:== 0: Success π> 0: Iteration failed in stepINFOπ< 0: ifINFO = -i, thei-th argument had an illegal value π= -50: Some of the internal settings likeNB,... are incorrect. π
See also π¦
DLA_TGLYAP_L3DLA_TGLYAP_L2DLA_TGLYAP_L3_2SDLA_TGLYAP_DAGDLA_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βFACTisCHARACTER. Specifies how the matrixAis given.== 'N': The matrix pencil(A,B)is given as a general matrix pencil and its Schur decompositionA = Q*S*Z**T,B = Q*R*Z**Twill be computed.== 'F': The matrixAis given as its Schur decomposition in terms ofSandQformA = Q*S*Q**T.== 'H': The matrix pencil(A,B)is given in generalized Hessenberg form and its Schur decompositionA = Q*S*Z**T,B = Q*R*Z**Twill be computed.
TRANSβTRANSisCHARACTER. Specifies the form of the system of equations with respect to(A,B):== 'N': Equation (1) is solved.== 'T': Equation (2) is solved.
MβMisINTEGER. The order of the matricesA,B,YandX.M >= 0.AβAisDOUBLE PRECISIONarray, dimension(LDA,M).- If
FACT == ,the matrixAis a general matrix and it is overwritten with the quasi upper triangular matrixSof the generalized schur decomposition. - If
FACT == ,the matrixAcontains its (quasi-) upper triangular matrixSof the generalized Schur decomposition of(A,B). - If
FACT == ,the matrixAis an upper Hessenberg matrix of the generalized Hessenberg form(A,B)and it is overwritten with the quasi upper triangular matrixSof the generalized Schur decomposition. (Note: the original really hasFACT == ,with nothing after it, so we're preserving that exactly, bestie. It's a mystery, but we don't guess. π)
- If
LDAβLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BβBisDOUBLE PRECISIONarray, dimension(LDB,M).- If
FACT == ,the matrixBa general matrix and it is overwritten with the upper triangular matrix of the generalized Schur decomposition. - If
FACT == ,the matrixBcontains its upper triangular matrixRof the generalized schur Schur decomposition of(A,B). - If
FACT == ,the matrixBis 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.
- If
LDBβLDBisINTEGER. The leading dimension of the arrayB.LDB >= max(1,M).QβQisDOUBLE PRECISIONarray, dimension(LDQ,M).- If
FACT == ,the matrixQis an emptyM-by-Mmatrix on input and contains the left Schur vectors of(A,B)on output. - If
FACT == ,the matrixQcontains the left Schur vectors of(A,B). - If
FACT == ,the matrixQis an emptyM-by-Mmatrix on input and contains the left Schur vectors of(A,B)on output.
- If
LDQβLDQisINTEGER. The leading dimension of the arrayQ.LDQ >= max(1,M).ZβZisDOUBLE PRECISIONarray, dimension(LDZ,M).- If
FACT == ,the matrixZis an emptyM-by-Mmatrix on input and contains the right Schur vectors of(A,B)on output. - If
FACT == ,the matrixZcontains the right Schur vectors of(A,B). - If
FACT == ,the matrixZis an emptyM-by-Mmatrix on input and contains the right Schur vectors of(A,B)on output.
- If
LDZβLDZisINTEGER. The leading dimension of the arrayZ.LDZ >= max(1,M).XβXisDOUBLE PRECISIONarray, dimension(LDX,N). On input, the matrixXcontains the right hand sideY. On output, the matrixXcontains the solution of Equation (1) or (2). Right hand sideYand the solutionXare symmetricM-by-Mmatrices.LDXβLDXisINTEGER. The leading dimension of the arrayX.LDX >= max(1,M).SCALEβSCALEisDOUBLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true.WORKβWORKisDOUBLE PRECISIONarray, dimension(MAX(1,LDWORK)). Workspace for the algorithm. The optmimal workspace is given either by\ref mepack_memory_frontendor a previous call to this routine withLDWORK === -1. (Yes, triple equals, we see it, we keep it. π )LDWORKβLDWORKisINTEGER. Size of the workspace for the algorithm. This can be determined by a call\ref mepack_memory_frontend. Alternatively, ifLDWORK == -1on input the subroutine will return the required size of the workspace inLDWORKwithout performing any computations.INFOβINFOisINTEGER.== 0: successful exit π= 1:DGGESfailed π= 2:DLA_SORT_GEVfailed π= 3: Inner solver failed π< 0: ifINFO = -i, thei-th argument had an illegal value π
See also π
DLA_TGSTEIN_L3DLA_TGSTEIN_L3_2SDLA_TGSTEIN_DAGDLA_TGSTEIN_L2DLA_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
- fedora 43: mepack-devel 1.1.2-1.fc43 Β· GPL-3.0-or-later and LGPL-2.1-or-later and BSD-3-Clause
- fedora 43: mepack-devel 1.1.2-1.fc43 Β· GPL-3.0-or-later and LGPL-2.1-or-later and BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms