sglgelyap(3)
π sglgelyap β MEPACK π
okay bestie, sit down, hydrate, put your phone on do-not-disturb, because we are reading the sglgelyap page together and it is long and it is iconic. this is the Single Precision corner of MEPACK and it is lowkey carrying the whole standard Lyapunov/Stein situation. three parts, we're doing part one, no skipping, no skimming, we eat every flag. π
β¨ NAME β¨
sglgelyap β Single Precision π
- Single precision solvers for standard Lyapunov and Stein equations with general coefficient matrices.
like, that's the whole vibe. general coefficient matrices. not triangular, not diagonal, general. she's flexible. she's booked and busy. π
π¦ SYNOPSIS π¦
Functions
here's the roster, bestie β four whole routines, each one a little main character:
subroutine sla_gelyapβ Frontend for the solution of Standard Lyapunov Equations.
subroutine sla_gelyap (fact, trans, m, a, lda, q, ldq, x, ldx, scale,
work, ldwork, info)
subroutine sla_gesteinβ Frontend for the solution of Standard Stein Equations.
subroutine sla_gestein (fact, trans, m, a, lda, q, ldq, x, ldx, scale,
work, ldwork, info)
subroutine sla_gelyap_refineβ Iterative Refinement for the Standard Lyapunov Equation.
subroutine sla_gelyap_refine (trans, guess, m, a, lda, x, ldx, y, ldy,
as, ldas, q, ldq, maxit, tau, convlog, work, ldwork, info)
subroutine sla_gestein_refineβ Iterative Refinement for the Standard Stein Equations.
subroutine sla_gestein_refine (trans, guess, m, a, lda, x, ldx, y, ldy,
as, ldas, q, ldq, maxit, tau, convlog, work, ldwork, info)
π DETAILED DESCRIPTION π
Single precision solvers for standard Lyapunov and Stein equations with general coefficient matrices.
that's it. that's the thesis statement. periodt. π
π FUNCTION DOCUMENTATION π
subroutine sla_gelyap π¦
subroutine sla_gelyap (character, dimension(1) fact, character, dimension(1)
trans, integer m, real, dimension(lda,*) a, integer lda, real,
dimension(ldq, *) q, integer ldq, real, dimension(ldx, *) x, integer
ldx, real scale, real, dimension(*) work, integer ldwork, integer info)
Frontend for the solution of Standard Lyapunov Equations.
Purpose β¨
okay so SLA_GELYAP solves a Lyapunov equation, and there are exactly two forms it will serve you, bestie:
A * X + X * A**T = SCALE * Y (1)
or
A ** T * X + X * A = SCALE * Y (2)
where A is a M-by-M general matrix or a matrix in upper Hessenberg form. The right hand side Y and the solution X are M-by-M matrices. The general matrix A can be supplied factorized in terms of its Schur decomposition. π
Parameters π«Ά
FACTβFACTisCHARACTER. Specifies how the matrixAis given.== 'N': the matrixAis given as a general matrix and its Schur decompositionA = Q*S*Q**Twill be computed.== 'F': the matrixAis given as its Schur decomposition in terms ofSandQformA = Q*S*Q**T.== 'H': the matrixAis given in upper Hessenberg form and its Schur decompositionA = Q*S*Q**Twill be computed.
TRANSβTRANSisCHARACTER. Specifies 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 matrixA.M >= 0.AβAisREAL array, dimension (LDA,M).- If
FACT ==, the matrixAis a general matrix and it is overwritten with its schur decompositionS. - If
FACT ==, the matrixAis an upper Hessenberg matrix and it is overwritten with its schur decompositionS. - If
FACT ==, the matrixAcontains its (quasi-) upper triangular matrixSbeing the Schur decomposition ofA.
- If
ngl bestie the original doc left those three FACT == blanks blank, so we're keeping them blank. character for character. we do not fix, we do not guess. π
LDAβLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).QβQisREAL array, dimension (LDQ,M).- If
FACT ==, the matrixQis an empty M-by-M matrix on input and contains the Schur vectors ofAon output. - If
FACT ==, the matrixQis an empty M-by-M matrix on input and contains the Schur vectors ofAon output. - If
FACT ==, the matrixQcontains the Schur vectors ofA.
- If
LDQβLDQisINTEGER. The leading dimension of the arrayQ.LDQ >= 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 symmetric M-by-M matrices.LDXβLDXisINTEGER. The leading dimension of the arrayX.LDB >= max(1,M).
yeah it says LDB, we know, we're keeping it, it's canon now π
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 inLDWORKagain without performing any computations.INFOβINFOisINTEGER.== 0: successful exit= 1:SHGEESfailed= 2:SLA_SORT_EVfailed= 3: Internal solver failed< 0: ifINFO = -i, the i-th argument had an illegal value
See also π
SLA_TRLYAP_L3SLA_TRLYAP_L3_2SSLA_TRLYAP_DAGSLA_TRLYAP_L2SLA_TRLYAP_RECURSIVE
Author π
Martin Koehler, MPI Magdeburg
Date πΈ
October 2025
Definition at line 175 of file sla_gelyap.f90.
subroutine sla_gelyap_refine π§
subroutine sla_gelyap_refine (character, dimension(1) trans, character,
dimension(1) guess, integer m, real, dimension(lda, *) a, integer lda,
real, dimension( ldx, *) x, integer ldx, real, dimension(ldy, *) y,
integer ldy, real, dimension(ldas, *) as, integer ldas, real,
dimension(ldq, *) q, integer ldq, integer maxit, real tau, real,
dimension(*) convlog, real, dimension(*) work, integer ldwork, integer
info)
Iterative Refinement for the Standard Lyapunov Equation.
Purpose β¨
SLA_GELYAP_REFINE solves a standard Lyapunov equation, iterative-refinement style, in one of these two forms:
A * X + X * A^T = SCALE * Y (1)
or
A^T * X + X * A = SCALE * Y (2)
where A is a M-by-M matrix using iterative refinement. The right hand side Y and the solution X are M-by-M matrices. The matrix A needs to be provided as the original data as well as in Schur decomposition since both are required in the iterative refinement process. π
Parameters π«Ά
TRANSβTRANSisCHARACTER. Specifies the form of the system of equations with respect toA:== 'N': Equation (1) is solved== 'T': Equation (2) is solved
GUESSβGUESSisCHARACTER. 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βMisINTEGER. The order of the matrixA.M >= 0.AβAisREAL array, dimension (LDA,M). The arrayAcontains the original matrixAdefining the eqaution.LDAβLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).XβXisREAL array, dimension (LDX,M). On input, the arrayXcontains the initial guess, ifGUESS = 'I'. On output, the arrayXcontains the solutionX.LDXβLDXisINTEGER. The leading dimension of the arrayX.LDX >= max(1,M).YβYisREAL array, dimension (LDY,M). On input, the arrayYcontains the right hand sideY. The array stays unchanged during the iteration.LDYβLDYisINTEGER. The leading dimension of the arrayY.LDY >= max(1,M).ASβASisREAL array, dimension (LDAS,M). The arrayAScontains the Schur decomposition ofA.LDASβLDASisINTEGER. The leading dimension of the arrayAS.LDAS >= max(1,M).QβQisREAL array, dimension (LDQ,M). The arrayQcontains the Schur vectors forAas returned bySGEES.LDQβLDQisINTEGER. The leading dimension of the arrayQ.LDQ >= max(1,M).MAXITβMAXITisINTEGER. 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βTAUisREAL. 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βCONVLOGisREAL array, dimension (MAXIT). TheCONVLOGarray contains the convergence history of the iterative refinement.CONVLOG(I)contains the maximum relative residual before it is solved for the I-th time.WORKβWORKisREAL 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β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.INFOβ β¨ and this is exactly where the page cuts off, bestieβ¦ part two is coming β¨== 0: Success π> 0: Iteration failed in stepINFO< 0: ifINFO = -i, the i-th argument had an illegal value= -50: Some of the internal settings likeNB,... are incorrect.
See also π
SLA_TRLYAP_L3SLA_TRLYAP_L2SLA_TRLYAP_L3_2SSLA_TRLYAP_DAGSLA_TRLYAP_RECURSIVE
Author βοΈ
Martin Koehler, MPI Magdeburg
Date π
October 2025
Definition at line 201 of file sla_gelyap_refine.f90.
π¦ subroutine sla_gestein π¦
okay bestie, deep breath, this one's a whole frontend π«Ά
subroutine sla_gestein (character, dimension(1) fact, character,
dimension(1) trans, integer m, real, dimension(lda,*) a, integer lda,
real, dimension(ldq, *) q, integer ldq, real, dimension(ldx, *) x,
integer ldx, real scale, real, dimension(*) work, integer ldwork,
integer info)
Frontend for the solution of Standard Stein Equations. β¨
Purpose π
SLA_GESTEIN solves a standard Stein equation of the following forms:
A * X * A^T - X = SCALE * Y (2)
or
A^T * X * A - X = SCALE * Y (1)
where A is a M-by-M general matrix or a matrix in upper Hessenberg form. The right hand side Y and the solution X are M-by-M matrices. The general matrix A can be supplied factorized in terms of its Schur decomposition.
Parameters π
FACTβ isCHARACTER, and it tells us how the matrixAgot handed to us:== 'N': The matrixAis given as a general matrix and its Schur decompositionA = Q*S*Q**Twill be computed.== 'F': The matrixAis given as its Schur decomposition in terms ofSandQformA = Q*S*Q**T== 'H': The matrixAis given in upper Hessenberg form and its Schur decompositionA = Q*S*Q**Twill be computed
TRANSβ isCHARACTER, and it picks which flavour of the system we're solving with respect toA:== 'N': Equation (1) is solved.== 'T': Equation (2) is solved.
Mβ isINTEGER. The order of the matricesAandC.M >= 0.Aβ isREALarray, dimension(LDA,M). Depends on theFACTvibe:- If
FACT ==, the matrixAis a general matrix and it is overwritten with its schur decompositionS. - If
FACT ==, the matrixAcontains its (quasi-) upper triangular matrixSbeing the Schur decomposition ofA. - If
FACT ==, the matrixAis an upper Hessenberg matrix and it is overwritten with its schur decompositionS.
- If
LDAβ isINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).Qβ isREALarray, dimension(LDA,M)π- If
FACT ==, the matrixQis an emptyM-by-Mmatrix on input and contains the Schur vectors ofAon output. - If
FACT ==, the matrixQcontains the Schur vectors ofA. - If
FACT ==, the matrixQis an emptyM-by-Mmatrix on input and contains the Schur vectors ofAon output.
- If
LDQβ isINTEGER. The leading dimension of the arrayQ.LDQ >= max(1,M).Xβ isREALarray, 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β isINTEGER. The leading dimension of the arrayX.LDB >= max(1,M).SCALEβ isREAL.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β isREALarray, 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β isINTEGER. 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 inLDWORKagain without performing any computations.INFOβ isINTEGER:== 0: successful exit π= 1:SHGEESfailed= 2:SLA_SORT_EVfailed= 3: Inner solver failed< 0: ifINFO = -i, the i-th argument had an illegal value
See also π
SLA_TRSTEIN_L3SLA_TRSTEIN_L3_2SSLA_TRSTEIN_DAGSLA_TRSTEIN_L2SLA_TRSTEIN_RECURSIVE
Author βοΈ
Martin Koehler, MPI Magdeburg
Date π
October 2025
Definition at line 175 of file sla_gestein.f90.
π§ subroutine sla_gestein_refine π§
the glow-up arc of sla_gestein β same equation, but β¨iterativelyβ¨
subroutine sla_gestein_refine (character, dimension(1) trans, character,
dimension(1) guess, integer m, real, dimension(lda, *) a, integer lda,
real, dimension( ldx, *) x, integer ldx, real, dimension(ldy, *) y,
integer ldy, real, dimension(ldas, *) as, integer ldas, real,
dimension(ldq, *) q, integer ldq, integer maxit, real tau, real,
dimension(*) convlog, real, dimension(*) work, integer ldwork, integer
info)
Iterative Refinement for the Standard Stein Equations. π₯
Purpose π
SLA_GESTEIN_REFINE solves a standard Stein equation of the following forms:
A * X * A^T - X = SCALE * Y (1)
or
A^T * X * A - X = SCALE * Y (2)
where A is a M-by-M matrix using iterative refinement. The right hand side Y and the solution X are M-by-M matrices. The matrix A needs to be provided as the original data as well as in Schur decomposition since both are required in the iterative refinement process. π
Parameters π
TRANSβ isCHARACTER. Specifies the form of the system of equations with respect toA:== 'N': Equation (1) is solved== 'T': Equation (2) is solved
GUESSβ isCHARACTER. 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β isINTEGER. The order of the matricesAandB.M >= 0.Aβ isREALarray, dimension(LDA,M). The arrayAcontains the original matrixAdefining the eqaution.LDAβ isINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).Xβ isREALarray, dimension(LDX,M). On input, the arrayXcontains the initial guess, ifGUESS = 'I'. On output, the arrayXcontains the solutionX. πLDXβ isINTEGER. The leading dimension of the arrayX.LDX >= max(1,M).Yβ isREALarray, dimension(LDY,M). On input, the arrayYcontains the right hand sideY. The array stays unchanged during the iteration. (iconic, honestly β it just sits there being correct π«Ά)LDYβ isINTEGER. The leading dimension of the arrayY.LDY >= max(1,M).ASβ isREALarray, dimension(LDAS,M). The arrayAScontains the Schur decomposition ofA.LDASβ isINTEGER. The leading dimension of the arrayAS.LDAS >= max(1,M).Qβ isREALarray, dimension(LDQ,M). The arrayQcontains the Schur vectors forAas returned bySGEES.LDQβ isINTEGER. The leading dimension of the arrayQ.LDQ >= max(1,M).MAXITβ isINTEGER. On input,MAXITcontains the maximum number of iteration that are performed,2 <= MAXIT <= 100On exit,MAXITcontains the number of iteration steps taken by the algorithm.TAUβ isREAL. On input,TAUcontains the additional security factor for the stopping criterion, typical values are0.1On exit,TAUcontains the last relative residual when the stopping criterion got valid.CONVLOGβ isREALarray, 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β isREALarray, 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β isINTEGER. 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β isINTEGER:== 0: Success π> 0: Iteration failed in stepINFO< 0: ifINFO = -i, the i-th argument had an illegal value= -50: Some of the internal settings likeNB,... are incorrect.
See also π
SLA_TRSTEIN_L3SLA_TRSTEIN_L2SLA_TRSTEIN_L3_2SSLA_TRSTEIN_DAGSLA_TRSTEIN_RECURSIVE
π Author π
Martin Koehler, MPI Magdeburg π«Ά β yes bestie, a whole actual human wrote this and we're obsessed with them for it.
π Date
October 2025 β¨
Definition at line 202 of file sla_gestein_refine.f90. Like, literally line 202. That's where the magic lives. π
β¨ Author β¨
Generated automatically by Doxygen for MEPACK from the source code π€π β so if the prose is a little stiff in places, that's why. Blame the robot, not Martin.
Okay and that's the whole page, bestie!! π You just read sglgelyap(3) from MEPACK Version 1.1.2, stamped Thu Oct 9 2025 00:00:00, and no cap, you understood every bit of it. π Go forth and be the main character of your own build system. πβ¨π¦
π¦ 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