sglgelyap(3)

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

πŸ’… 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 β€” FACT is CHARACTER. Specifies how the matrix A is given.
    • == 'N': the matrix A is given as a general matrix and its Schur decomposition A = Q*S*Q**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 A is given in upper Hessenberg form and its Schur decomposition A = Q*S*Q**T will be computed.
  • TRANS β€” TRANS is CHARACTER. Specifies 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 matrix A. M >= 0.
  • A β€” A is REAL array, dimension (LDA,M).
    • If FACT == , the matrix A is a general matrix and it is overwritten with its schur decomposition S.
    • If FACT == , the matrix A is an upper Hessenberg matrix and it is overwritten with its schur decomposition S.
    • If FACT == , the matrix A contains its (quasi-) upper triangular matrix S being the Schur decomposition of A.
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 β€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • Q β€” Q is REAL array, dimension (LDQ,M).
    • If FACT == , the matrix Q is an empty M-by-M matrix on input and contains the Schur vectors of A on output.
    • If FACT == , the matrix Q is an empty M-by-M matrix on input and contains the Schur vectors of A on output.
    • If FACT == , the matrix Q contains the Schur vectors of A.
  • LDQ β€” LDQ is INTEGER. The leading dimension of the array Q. LDQ >= max(1,M).
  • X β€” X is REAL 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. LDB >= max(1,M).
yeah it says LDB, we know, we're keeping it, it's canon now πŸ’€
  • SCALE β€” SCALE is REAL. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true.
  • WORK β€” WORK is REAL 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 the 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 again without performing any computations.
  • INFO β€” INFO is INTEGER.
    • == 0: successful exit
    • = 1: SHGEES failed
    • = 2: SLA_SORT_EV failed
    • = 3: Internal solver failed
    • < 0: if INFO = -i, the i-th argument had an illegal value

See also πŸ”

  • SLA_TRLYAP_L3
  • SLA_TRLYAP_L3_2S
  • SLA_TRLYAP_DAG
  • SLA_TRLYAP_L2
  • SLA_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 β€” TRANS is CHARACTER. 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. Specifies whether X contains an initial guess or nor 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 matrix A. M >= 0.
  • A β€” A is REAL array, dimension (LDA,M). The array A contains the original matrix A defining the eqaution.
  • LDA β€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • X β€” X is REAL 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 is INTEGER. The leading dimension of the array X. LDX >= max(1,M).
  • Y β€” Y is REAL array, dimension (LDY,M). On input, the array Y contains the right hand side Y. The array stays unchanged during the iteration.
  • LDY β€” LDY is INTEGER. The leading dimension of the array Y. LDY >= max(1,M).
  • AS β€” AS is REAL array, dimension (LDAS,M). The array AS contains the Schur decomposition of A.
  • LDAS β€” LDAS is INTEGER. The leading dimension of the array AS. LDAS >= max(1,M).
  • Q β€” Q is REAL array, dimension (LDQ,M). The array Q contains the Schur vectors for A as returned by SGEES.
  • LDQ β€” LDQ is INTEGER. The leading dimension of the array Q. LDQ >= max(1,M).
  • MAXIT β€” MAXIT is INTEGER. On input, MAXIT contains the maximum number of iteration that are performed, 2 <= MAXIT <= 100. On exit, MAXIT contains the number of iteration steps taken by the algorithm.
  • TAU β€” TAU is REAL. 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.
  • CONVLOG β€” CONVLOG is REAL 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.
  • WORK β€” WORK is REAL 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.
  • 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.
  • INFO β€” ✨ and this is exactly where the page cuts off, bestie… part two is coming ✨
  • == 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 πŸ‘€

  • SLA_TRLYAP_L3
  • SLA_TRLYAP_L2
  • SLA_TRLYAP_L3_2S
  • SLA_TRLYAP_DAG
  • SLA_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 β€” is CHARACTER, and it tells us how the matrix A got handed to us:
    • == 'N': The matrix A is given as a general matrix and its Schur decomposition A = Q*S*Q**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 A is given in upper Hessenberg form and its Schur decomposition A = Q*S*Q**T will be computed
  • TRANS β€” is CHARACTER, and it picks which flavour of the system we're solving with respect to A:
    • == 'N': Equation (1) is solved.
    • == 'T': Equation (2) is solved.
  • M β€” is INTEGER. The order of the matrices A and C. M >= 0.
  • A β€” is REAL array, dimension (LDA,M). Depends on the FACT vibe:
    • If FACT == , the matrix A is a general matrix and it is overwritten with its schur decomposition S.
    • If FACT == , the matrix A contains its (quasi-) upper triangular matrix S being the Schur decomposition of A.
    • If FACT == , the matrix A is an upper Hessenberg matrix and it is overwritten with its schur decomposition S.
  • LDA β€” is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • Q β€” is REAL array, dimension (LDA,M) πŸ’œ
    • If FACT == , the matrix Q is an empty M-by-M matrix on input and contains the Schur vectors of A on output.
    • If FACT == , the matrix Q contains the Schur vectors of A.
    • If FACT == , the matrix Q is an empty M-by-M matrix on input and contains the Schur vectors of A on output.
  • LDQ β€” is INTEGER. The leading dimension of the array Q. LDQ >= max(1,M).
  • X β€” is REAL 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 β€” is INTEGER. The leading dimension of the array X. LDB >= max(1,M).
  • SCALE β€” is REAL. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. 🫢
  • WORK β€” is REAL 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 the this routine with LDWORK === -1.
  • 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 again without performing any computations.
  • INFO β€” is INTEGER:
    • == 0: successful exit πŸ’–
    • = 1: SHGEES failed
    • = 2: SLA_SORT_EV failed
    • = 3: Inner solver failed
    • < 0: if INFO = -i, the i-th argument had an illegal value

See also πŸ‘€

  • SLA_TRSTEIN_L3
  • SLA_TRSTEIN_L3_2S
  • SLA_TRSTEIN_DAG
  • SLA_TRSTEIN_L2
  • SLA_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 β€” is CHARACTER. Specifies the form of the system of equations with respect to A :
    • == 'N': Equation (1) is solved
    • == 'T': Equation (2) is solved
  • GUESS β€” is CHARACTER. Specifies whether X contains an initial guess or nor not.
    • = 'I': X contains an initial guess
    • = 'N': No initial guess, X is set to zero at the begin of the iteration.
  • M β€” is INTEGER. The order of the matrices A and B. M >= 0.
  • A β€” is REAL array, dimension (LDA,M). The array A contains the original matrix A defining the eqaution.
  • LDA β€” is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • X β€” is REAL 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 β€” is INTEGER. The leading dimension of the array X. LDX >= max(1,M).
  • Y β€” is REAL array, dimension (LDY,M). On input, the array Y contains the right hand side Y. The array stays unchanged during the iteration. (iconic, honestly β€” it just sits there being correct 🫢)
  • LDY β€” is INTEGER. The leading dimension of the array Y. LDY >= max(1,M).
  • AS β€” is REAL array, dimension (LDAS,M). The array AS contains the Schur decomposition of A.
  • LDAS β€” is INTEGER. The leading dimension of the array AS. LDAS >= max(1,M).
  • Q β€” is REAL array, dimension (LDQ,M). The array Q contains the Schur vectors for A as returned by SGEES.
  • LDQ β€” is INTEGER. The leading dimension of the array Q. LDQ >= max(1,M).
  • MAXIT β€” is INTEGER. On input, MAXIT contains the maximum number of iteration that are performed, 2 <= MAXIT <= 100 On exit, MAXIT contains the number of iteration steps taken by the algorithm.
  • TAU β€” is REAL. 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.
  • CONVLOG β€” is REAL 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. πŸ“ˆ
  • WORK β€” is REAL 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.
  • 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.
  • INFO β€” is INTEGER:
    • == 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 πŸ‘€

  • SLA_TRSTEIN_L3
  • SLA_TRSTEIN_L2
  • SLA_TRSTEIN_L3_2S
  • SLA_TRSTEIN_DAG
  • SLA_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