sglgglyap(3)
sglgglyap(3) π
MEPACK Β· section 3 Β· single precision, but make it fashion β¨
okay so bestie, buckle up π«Ά this page is all about the single precision frontends that solve generalized Lyapunov and Stein equations when your coefficient matrices are just... general. no cute structure to exploit, no shortcuts, just vibes, Schur decompositions and a lot of workspace. and ngl, this page is long, so we're doing it in parts. part 1 starts now π
NAME π
<pink>sglgglyap</pink> β Single Precision
- Single precision solvers for generalized Lyapunov and Stein equations with general coefficient matrices.
SYNOPSIS π¦
Functions
sla_gglyapβ frontend for the solution of Generalized Lyapunov Equations π
subroutine sla_gglyap (fact, trans, m, a, lda, b, ldb, q, ldq, z, ldz,
x, ldx, scale, work, ldwork, info)
sla_ggsteinβ frontend for the solution of Generalized Stein Equations β¨
subroutine sla_ggstein (fact, trans, m, a, lda, b, ldb, q, ldq, z, ldz,
x, ldx, scale, work, ldwork, info)
sla_gglyap_refineβ Iterative Refinement for the Generalized Lyapunov Equations π
subroutine sla_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)
Detailed Description π
Single precision solvers for generalized Lyapunov and Stein equations with general coefficient matrices.
Function Documentation π₯
subroutine sla_gglyap
subroutine sla_gglyap (character, dimension(1) fact, character, dimension(1)
trans, integer m, real, dimension(lda,*) a, integer lda, real,
dimension(ldb,*) b, integer ldb, real, dimension(ldq, *) q, integer ldq,
real, dimension(ldz,*) z, integer ldz, real, dimension(ldx, *) x,
integer ldx, real scale, real, dimension(*) work, integer ldwork,
integer info)
Frontend for the solution of Generalized Lyapunov Equations.
Purpose β¨
SLA_GGLYAP solves a generalized Lyapunov equation of the following forms:
A * X * B^T + B * X * A^T = SCALE * Y (1)
or
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 where Q and Z also need to be provided. π«Ά
Parameters
FACTβ it's aCHARACTER, and it decides how the matrixAshows up.== '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β also aCHARACTER, and it picks the shape of the system of equations with respect toA:== 'N': Equation (1) is solved.== 'T': Equation (2) is solved.
MβINTEGER. the order of the matricesA,B,YandX.M >= 0.AβREALarray, 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βINTEGER. the leading dimension of the arrayA.LDA >= max(1,M).BβREALarray, 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βINTEGER. the leading dimension of the arrayB.LDB >= max(1,M).QβREALarray, 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βINTEGER. the leading dimension of the arrayQ.LDQ >= max(1,M).ZβREALarray, 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βINTEGER. the leading dimension of the arrayZ.LDZ >= max(1,M).XβREALarray, 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 symmetricM-by-Mmatrices.
- On input, the matrix
LDXβINTEGER. the leading dimension of the arrayX.LDX >= max(1,M).SCALEβREAL.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true.WORKβREALarray, dimension(MAX(1,LDWORK)). Workspace for the algorithm. The optmimal workspace is given either by\ref mepack_memory_frontendor a previous call to the this routine withLDWORK === -1.LDWORKβINTEGER. 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βINTEGER.== 0: successful exit π= 1:SGGESfailed= 2:SLA_SORT_GEVfailed= 3: Inner solver failed< 0: ifINFO = -i, thei-th argument had an illegal value
See also
SLA_TGLYAP_L3SLA_TGLYAP_L3_2SSLA_TGLYAP_DAGSLA_TGLYAP_L2SLA_TGLYAP_RECURSIVE
Author
Martin Koehler, MPI Magdeburg
Date
October 2025
Definition
Defined at line 207 of file sla_gglyap.f90.
subroutine sla_gglyap_refine
subroutine sla_gglyap_refine (character, dimension(1) trans, character,
dimension(1) guess, integer m, real, dimension(lda, *) a, integer lda,
real, dimension(ldb, *) b, integer ldb, real, dimension( ldx, *) x,
integer ldx, real, dimension(ldy, *) y, integer ldy, real,
dimension(ldas, *) as, integer ldas, real, dimension(ldbs,*) bs, integer
ldbs, real, dimension(ldq, *) q, integer ldq, real, dimension(ldz, *) z,
integer ldz, integer maxit, real tau, real, dimension(*) convlog, real,
dimension(*) work, integer ldwork, integer info)
Iterative Refinement for the Generalized Lyapunov Equations.
Purpose π«
SLA_GGLYAP_REFINE solves a generalized Lyapunov equation of the following forms:
A * X * B^T + B * X * A^T = SCALE * Y (1)
or
A^T * X * B + B^T * X * A = SCALE * Y (2)
where (A,B) is a M-by-M matrix pencil using iterative refinement. The right hand side Y and the solution X are M-by-M matrices. The matrix pencil (A,B) needs to provide as the original data as well as in generalized Schur decomposition since both are required in the iterative refinement process. π§
Parameters
TRANSβCHARACTER. Specifies the form of the system of equations with respect toA:== 'N': Equation (1) is solved== 'T': Equation (2) is solved
GUESSβCHARACTER. Specifies whetherXcontains an initial guess or nor not.= 'I':Xcontains an initial guess= 'N': No initial guess,Xis set to zero at the begin of the iteration.
MβINTEGER. The order of the matricesAandB.M >= 0.AβREALarray, dimension(LDA,M). The arrayAcontains the original matrixAdefining the eqaution.LDAβINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BβREALarray, dimension(LDB,M). The arrayBcontains the original matrixBdefining the eqaution.LDBβINTEGER. The leading dimension of the arrayB.LDB >= max(1,M).XβREALarray, 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βINTEGER. The leading dimension of the arrayX.LDX >= max(1,M).YYβYis a REAL array, dimension(LDY,M). On input, the arrayYcontains the right hand sideY. The array stays unchanged during the iteration. πLDYβLDYis INTEGER. The leading dimension of the arrayY.LDY >= max(1,M). β¨ASβASis a REAL array, dimension(LDAS,M). The arrayAScontains the generalized Schur decomposition of theA. π¦LDASβLDASis INTEGER. The leading dimension of the arrayAS.LDAS >= max(1,M). πBSβBSis a REAL array, dimension(LDBS,M). The arrayAScontains the generalized Schur decomposition of theB. πΈLDBSβLDBSis INTEGER. The leading dimension of the arrayBS.LDBS >= max(1,M). πQβQis a REAL array, dimension(LDQ,M). The arrayQcontains the left generalized Schur vectors for(A,B)as returned bySGGES. πLDQβLDQis INTEGER. The leading dimension of the arrayQ.LDQ >= max(1,M). βZβZis a REAL array, dimension(LDZ,M). The arrayZcontains the right generalized Schur vectors for(A,B)as returned bySGGES. πLDZβLDZis INTEGER. The leading dimension of the arrayZ.LDZ >= max(1,M). πMAXITβMAXITis INTEGER. On input,MAXITcontains the maximum number of iteration that are performed,2 <= MAXIT <= 100. On exit,MAXITcontains the number of iteration steps taken by the algorithm. π₯TAUβTAUis REAL. 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. β¨CONVLOGβCONVLOGis a REAL array, 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. πWORKβWORKis a REAL array, dimension(MAX(1,LDWORK)). Workspace for the algorithm. The optmimal workspace is returned inLDWORK, ifLDWORK == -1on input. In this case no computations are performed. πLDWORKβLDWORKis INTEGER. IfLDWORK == -1the subroutine will return the required size of the workspace inLDWORKon exit. No computations are performed and none of the arrays are referenced. π«ΆINFOβINFOis INTEGER.== 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 β¨
SLA_TGLYAP_L3SLA_TGLYAP_L2SLA_TGLYAP_L3_2SSLA_TGLYAP_DAGSLA_TGLYAP_RECURSIVE
Author π
Martin Koehler, MPI Magdeburg
Date π
October 2025
Definition π
Definition at line 244 of file sla_gglyap_refine.f90.
subroutine sla_ggstein π§
subroutine sla_ggstein (character, dimension(1) fact, character,
dimension(1) trans, integer m, real, dimension(lda,*) a, integer lda,
real, dimension(ldb,*) b, integer ldb, real, dimension(ldq, *) q,
integer ldq, real, dimension(ldz,*) z, integer ldz, real, dimension(ldx,
*) x, integer ldx, real scale, real, dimension(*) work, integer ldwork,
integer info)
Frontend for the solution of Generalized Stein Equations. π
Purpose π
Okay so SLA_GGSTEIN solves a generalized Stein equation, and it's giving two possible forms, bestie:
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 are 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βAisREAL array, dimension(LDA,M). IfFACT ==, the matrixAis a general matrix and it is overwritten with the quasi upper triangular matrixSof the generalized schur decomposition. IfFACT ==, the matrixAcontains its (quasi-) upper triangular matrixSof the generalized Schur decomposition of(A,B). IfFACT ==, 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. πΈLDAβLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,M). πBβBisREAL array, dimension(LDB,M). IfFACT ==, the matrixBa general matrix and it is overwritten with the upper triangular matrix of the generalized Schur decomposition. IfFACT ==, the matrixBcontains its upper triangular matrixRof the generalized schur Schur decomposition of(A,B). IfFACT ==, 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. βLDBβLDBisINTEGER. The leading dimension of the arrayB.LDB >= max(1,M). πQβQisREAL array, dimension(LDQ,M). IfFACT ==, the matrixQis an emptyM-by-Mmatrix on input and contains the left Schur vectors of(A,B)on output. IfFACT ==, the matrixQcontains the left Schur vectors of(A,B). IfFACT ==, the matrixQis an emptyM-by-Mmatrix on input and contains the left Schur vectors of(A,B)on output. πLDQβLDQisINTEGER. The leading dimension of the arrayQ.LDQ >= max(1,M). π₯ZβZisREAL array, dimension(LDZ,M). IfFACT ==, the matrixZis an emptyM-by-Mmatrix on input and contains the right Schur vectors of(A,B)on output. IfFACT ==, the matrixZcontains the right Schur vectors of(A,B). IfFACT ==, the matrixZis an emptyM-by-Mmatrix on input and contains the right Schur vectors of(A,B)on output. πLDZβLDZisINTEGER. The leading dimension of the arrayZ.LDZ >= max(1,M). πXβXisREAL array, 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βSCALEisREAL.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. β¨WORKβWORKisREAL array, dimension(MAX(1,LDWORK)). Workspace for the algorithm. The optmimal workspace is given either by\ref mepack_memory_frontendor a previous call to the 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. πINFOβINFOisINTEGER.== 0: successful exit= 1: SGGES failed= 2: SLA_SORT_GEV failed= 3: Inner solver failed< 0: ifINFO = -i, thei-th argument had an illegal value. π§
See also β¨
SLA_TGSTEIN_L3SLA_TGSTEIN_L3_2SSLA_TGSTEIN_DAGSLA_TGSTEIN_L2SLA_TGSTEIN_RECURSIVE
Author π
Martin Koehler, MPI Magdeburg
Date π
October 2025
Definition π
Definition at line 208 of file sla_ggstein.f90.
This whole thing was generated automatically by Doxygen for MEPACK from the source code, version 1.1.2, dated Thu Oct 9 2025 00:00:00, and the man page is sglgglyap(3). That's the vibe, bestie, periodt. π
β¨
π¦ 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