dblggsylv(3)
๐ dblggsylv ๐
okay bestie, buckle up โ this is the dblggsylv(3) page from MEPACK, and it's giving "double precision, but make it fancy" ๐
โจ NAME โจ
dblggsylv โ Double Precision
- Double Precision routines for standard Sylvester equations.
๐ฆ SYNOPSIS ๐ฆ
๐ธ Functions ๐ธ
subroutine dla_ggcsylvโ Frontend for the solution of Coupled Generalized Sylvester Equations.subroutine dla_ggcsylv_dualโ Frontend for the solution of the dual Coupled Generalized Sylvester Equations.subroutine dla_ggsylvโ Frontend for the solution of Generalized Sylvester Equations.subroutine dla_ggcsylv_dual_refineโ Iterative Refinement for the dual Coupled Generalized Sylvester Equations.subroutine dla_ggcsylv_refineโ Iterative Refinement for the Coupled Generalized Sylvester Equations.subroutine dla_ggsylv_refineโ Iterative Refinement for the Generalized Sylvester Equations.
๐ the actual signatures, verbatim, no notes ๐
subroutine dla_ggcsylv (facta, factb, transa, transb, sgn1, sgn2, m, n,
a, lda, b, ldb, c, ldc, d, ldd, qa, ldqa, za, ldza, qb, ldqb, zb,
ldzb, e, lde, f, ldf, scale, work, ldwork, info)
subroutine dla_ggcsylv_dual (facta, factb, transa, transb, sgn1, sgn2,
m, n, a, lda, b, ldb, c, ldc, d, ldd, qa, ldqa, za, ldza, qb, ldqb,
zb, ldzb, e, lde, f, ldf, scale, work, ldwork, info)
subroutine dla_ggsylv (facta, factb, transa, transb, sgn, m, n, a, lda,
b, ldb, c, ldc, d, ldd, qa, ldqa, za, ldza, qb, ldqb, zb, ldzb, x,
ldx, scale, work, ldwork, info)
subroutine dla_ggcsylv_dual_refine (transa, transb, guess, sgn1, sgn2,
m, n, a, lda, b, ldb, c, ldc, d, ldd, r, ldr, l, ldl, e, lde, f,
ldf, as, ldas, bs, ldbs, cs, ldcs, ds, ldds, q, ldq, z, ldz, u, ldu,
v, ldv, maxit, tau, convlog, work, ldwork, info)
subroutine dla_ggcsylv_refine (transa, transb, guess, sgn1, sgn2, m, n,
a, lda, b, ldb, c, ldc, d, ldd, r, ldr, l, ldl, e, lde, f, ldf, as,
ldas, bs, ldbs, cs, ldcs, ds, ldds, q, ldq, z, ldz, u, ldu, v, ldv,
maxit, tau, convlog, work, ldwork, info)
subroutine dla_ggsylv_refine (transa, transb, guess, sgn, m, n, a, lda,
b, ldb, c, ldc, d, ldd, x, ldx, y, ldy, as, ldas, bs, ldbs, cs,
ldcs, ds, ldds, q, ldq, z, ldz, u, ldu, v, ldv, maxit, tau, convlog,
work, ldwork, info)
๐ Detailed Description ๐
Double Precision routines for standard Sylvester equations.
This subsection contains the solvers for generalized Sylvester equations with general coefficient matrices in double precision arithmetic. The generalized Schur decompositions are computed in double precision with the help of LAPACK. โจ
๐ Function Documentation ๐
๐ subroutine dla_ggcsylv ๐
subroutine dla_ggcsylv (character, dimension(1) facta, character,
dimension(1) factb, character, dimension(1) transa, character,
dimension(1) transb, double precision sgn1, double precision sgn2,
integer m, integer n, double precision, dimension(lda,*) a, integer lda,
double precision, dimension(ldb, *) b, integer ldb, double precision,
dimension(ldc, *) c, integer ldc, double precision, dimension(ldd,*) d,
integer ldd, double precision, dimension(ldqa, *) qa, integer ldqa,
double precision, dimension(ldza, *) za, integer ldza, double precision,
dimension(ldqb, *) qb, integer ldqb, double precision, dimension(ldzb,
*) zb, integer ldzb, double precision, dimension(lde, *) e, integer lde,
double precision, dimension(ldf,*) f, integer ldf, double precision
scale, double precision, dimension(*) work, integer ldwork, integer
info)
Frontend for the solution of Coupled Generalized Sylvester Equations.
โญ Purpose โญ
okay so bestie, DLA_GGCSYLV solves a coupled generalized Sylvester equation, and there are two flavors of it:
op1(A) * R + SGN1 * L * op2(B) = SCALE * E (1)
op1(C) * R + SGN2 * L * op2(D) = SCALE * F
where (A,C) is a M-by-M matrix pencil and (B,D) is a N-by-N matrix pencil. The right hand side (E,F) and the solution (R,L) are M-by-N matrix pencils. The pencils (A,C) and (B,D) can be either given as general unreduced matrices, as generalized Hessenberg form, or in terms of their generalized Schur decomposition. If they are given as general matrices or as a generalized Hessenberg form their generalized Schur decomposition will be computed. ๐
๐ธ Parameters ๐ธ
FACTA
FACTA is CHARACTER. Specifies how the matrix pencil (A,C) is given.
'N'โ The matrix pencil(A,C)is given as a general matrices and its Schur decompositionA = QA*S*ZA**T,C = QA*R*ZA**Twill be computed.'F'โ The matrix pencil(A,C)is already in generalized Schur form andS,R,QA, andZAare given.'H'โ The matrix pencil(A,C)is given in generalized Hessenberg form and its Schur decompositionA = QA*S*ZA**T,C = QA*R*ZA**Twill be computed.
FACTB
FACTB is CHARACTER. Specifies how the matrix pencil (B,D) is given.
'N'โ The matrix pencil(B,D)is given as a general matrices and its Schur decompositionB = QB*U*ZB**T,D = QB*V*ZB**Twill be computed.'F'โ The matrix pencil(B,D)is already in generalized Schur form andU,V,QB, andZBare given.'H'โ The matrix pencil(B,D)is given in generalized Hessenberg form and its Schur decompositionB = QB*U*ZB**T,D = QB*V*ZB**Twill be computed.
TRANSA
TRANSA is CHARACTER. Specifies the form of the system of equations with respect to A and C:
'N'โop1(A) = A'T'โop1(A) = A**T
TRANSB
TRANSB is CHARACTER. Specifies the form of the system of equations with respect to B and D:
'N'โop2(B) = B,'T'โop2(B) = B**T
SGN1
SGN1 is DOUBLE PRECISION, allowed values: +/-1. Specifies the sign between in the first equation. ๐ซถ
SGN2
SGN2 is DOUBLE PRECISION, allowed values: +/-1. Specifies the sign between in the second equation. ๐ซถ
M
M is INTEGER. The order of the matrices A and C. M >= 0.
N
N is INTEGER. The order of the matrices B and D. N >= 0.
A
A is DOUBLE PRECISION array, dimension (LDA,M).
- If
FACT ==, the matrixAis a general matrix and it is overwritten with the (quasi-) upper triangular factorSof the Schur decomposition of(A,C). - If
FACT ==, the matrixAcontains its (quasi-) upper triangular matrixSof the Schur decomposition of(A,C). - If
FACT ==, the matrixAis an upper Hessenberg matrix of the generalized Hessenberg form(A,C)and it is overwritten with the (quasi-) upper triangular factorSof the Schur decomposition of(A,C).
LDA
LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
B
B is DOUBLE PRECISION array, dimension (LDB,N).
- If
FACT ==, the matrixBis a general matrix and it is overwritten with the (quasi-) upper triangular factorUof the Schur decomposition of(B,D). - If
FACT ==, the matrixBcontains its (quasi-) upper triangular matrixUof the Schur decomposition of(B,D). - If
FACT ==, the matrixBis an upper Hessenberg matrix of the generalized Hessenberg form(B,D)and it is overwritten with the (quasi-) upper triangular factorUof the Schur decomposition of(B,D).
LDB
LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
C
C is DOUBLE PRECISION array, dimension (LDC,M).
- If
FACT ==, the matrixCis a general matrix and it is overwritten with the upper triangular factorRof the Schur decomposition of(A,C). - If
FACT ==, the matrixCcontains its upper triangular matrixRof the Schur decomposition of(A,C). - If
FACT ==, the matrixCis the upper triangular matrix of the generalized Hessenberg form(A,C)and it is overwritten with the upper triangular factorRof the Schur decomposition of(A,C).
LDC
LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
D
D is DOUBLE PRECISION array, dimension (LDD,N).
- If
FACT ==, the matrixDis a general matrix and it is overwritten with the upper triangular factorVof the Schur decomposition of(B,D). - If
FACT ==, the matrixDcontains its upper triangular matrixVof the Schur decomposition of(B,D). - If
FACT ==, the matrixDis the upper triangular matrix of the generalized Hessenberg form(B,D)and it is overwritten with the upper triangular factorVof the Schur decomposition of(B,D).
LDD
LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
QA
QA is DOUBLE PRECISION array, dimension (LDQA,M).
- If
FACT ==, the matrixQAis an emptyM-by-Mmatrix on input and contains the left Schur vectors of(A,C)on output. - If
FACT ==, the matrixQAcontains the left Schur vectors of(A,C). - If
FACT ==, the matrixQAis an emptyM-by-Mmatrix on input and contains the left Schur vectors of(A,C)on output.
LDQA
LDQA is INTEGER. The leading dimension of the array QA. LDQA >= max(1,M).
ZA
ZA is DOUBLE PRECISION array, dimension (LDZA,M).
- If
FACT ==, the matrixZAis an emptyM-by-Mmatrix on input and contains the right Schur vectors of(A,C)on output. - If
FACT ==, the matrixZAcontains the right Schur vectors of(A,C). - If
FACT ==, the matrixZAis an emptyM-by-Mmatrix on input and contains the right Schur vectors of(A,C)on output.
LDZA
LDZA is INTEGER. The leading dimension of the array ZA. LDZA >= max(1,M).
QB
QBโ DOUBLE PRECISION array, dimension(LDQB,N). IfFACT ==, the matrixQBis an emptyN-by-Nmatrix on input and contains the left Schur vectors of(B,D)on output. IfFACT ==, the matrixQBcontains the left Schur vectors of(B,D). IfFACT ==, the matrixQBis an emptyM-by-Mmatrix on input and contains the left Schur vectors of(B,D)on output.LDQBโ INTEGER. The leading dimension of the arrayQB.LDQB >= max(1,N).ZBโ DOUBLE PRECISION array, dimension(LDZB,N). IfFACT ==, the matrixZBis an emptyN-by-Nmatrix on input and contains the right Schur vectors of(B,D)on output. IfFACT ==, the matrixZBcontains the right Schur vectors of(B,D). IfFACT ==, the matrixZBis an emptyM-by-Mmatrix on input and contains the right Schur vectors of(B,D)on output.LDZBโ INTEGER. The leading dimension of the arrayZB.LDZB >= max(1,N).Eโ DOUBLE PRECISION array, dimension(LDE,N). On input, the matrixEcontains the right hand sideE. On output, the matrixEcontains the solutionR.LDEโ INTEGER. The leading dimension of the arrayE.LDE >= max(1,M).Fโ DOUBLE PRECISION array, dimension(LDF,N). On input, the matrixFcontains the right hand sideF. On output, the matrixFcontains the solutionL.LDFโ INTEGER. The leading dimension of the arrayF.LDF >= max(1,M).SCALEโ DOUBLE 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โ DOUBLE PRECISION 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โ INTEGER. IfLDWORK == -1on input the subroutine will return the required size of the workspace inLDWORKon exit. No computations are performed and none of the arrays are referenced.INFOโ INTEGER.== 0: successful exit= 1:DHGGESfailed= 2:DLA_SORT_GEVfailed= 3: Inner solver failed< 0: ifINFO = -i, thei-th argument had an illegal value
See also ๐
DLA_TGCSYLV_DAGDLA_TGCSYLV_LEVEL3DLA_TGCSYLV_L3_2SDLA_TGCSYLV_L2_UNOPTDLA_TGCSYLV_L2DLA_TGCSYLV_L2_REORDERDLA_TGCSYLV_L2_LOCAL_COPY_32DLA_TGCSYLV_L2_LOCAL_COPY_64DLA_TGCSYLV_L2_LOCAL_COPY_96DLA_TGCSYLV_L2_LOCAL_COPY_128DLA_TGCSYLV_L2_LOCAL_COPY
Author โจ
Martin Koehler, MPI Magdeburg
Date ๐๏ธ
October 2025
Definition at line 333 of file dla_ggcsylv.f90.
๐ฆ subroutine dla_ggcsylv_dual ๐ฆ
subroutine dla_ggcsylv_dual (character, dimension(1) facta, character,
dimension(1) factb, character, dimension(1) transa, character,
dimension(1) transb, double precision sgn1, double precision sgn2,
integer m, integer n, double precision, dimension(lda,*) a, integer lda,
double precision, dimension(ldb, *) b, integer ldb, double precision,
dimension(ldc, *) c, integer ldc, double precision, dimension(ldd,*) d,
integer ldd, double precision, dimension(ldqa, *) qa, integer ldqa,
double precision, dimension(ldza, *) za, integer ldza, double precision,
dimension(ldqb, *) qb, integer ldqb, double precision, dimension(ldzb,
*) zb, integer ldzb, double precision, dimension(lde, *) e, integer lde,
double precision, dimension(ldf,*) f, integer ldf, double precision
scale, double precision, dimension(*) work, integer ldwork, integer
info)
Frontend for the solution of the dual Coupled Generalized Sylvester Equations. bestie, this is the glow-up you asked for ๐
Purpose ๐
DLA_GGCSYLV_DUAL_L3 solves a generalized coupled Sylvester equation of the following form:
op1(A)**T * R + op1(C)**T * L = SCALE * E (1)
SGN1 * R * op2(B)**T + SGN2 * L * op2(D)** T = SCALE * F
where A and C are M-by-M matrices and B and D are N-by-N matrices. The right hand sides E, F and the solutions R, L are M-by-N matrices. The equation (1) is the dual to the generalized coupled Sylvester equation
op1(A) * R + SGN1 * L * op2(B) = SCALE * E (2)
op1(C) * R + SGN2 * L * op2(D) = SCALE * F
The equation (1) is the dual one to equation (2) with respect to the underlying linear system. Let Z be the matrix formed by rewriting (2) into its Kronecker form. This yields
| kron(I, op1(A)) SGN1*kron(op2(B)**T, I) | | Vec R | | Vec E |
Z X = | |*| | = | |
| kron(I, op1(C)) SGN2*kron(op2(D)**T, I) | | Vec L | | Vec F |
Regarding Z**T one obtains
| kron(I, op1(A)**T ) kron(I, op1(C)**T) | | Vec R | | Vec E |
Z**T X = | |*| | = | |
| SGN1*kron(op2(B), I) SGN2*kron(op2(D), I) | | Vec L | | Vec F |
which belongs to the Sylvester equation (1). For this reason the parameters TRANSA and TRANSB are expressed in terms of the Sylvester equation (2).
Parameters ๐
FACTAโ CHARACTER. Specifies how the matrix pencil(A,C)is given.== 'N': The matrix pencil(A,C)is given as a general matrices and its Schur decompositionA = QA*S*ZA**T,C = QA*R*ZA**Twill be computed.== 'F': The matrix pencil(A,C)is already in generalized Schur form andS,R,QA, andZAare given.== 'H': The matrix pencil(A,C)is given in generalized Hessenberg form and its Schur decompositionA = QA*S*ZA**T,C = QA*R*ZA**Twill be computed.
FACTBโ CHARACTER. Specifies how the matrix pencil(B,D)is given.== 'N': The matrix pencil(B,D)is given as a general matrices and its Schur decompositionB = QB*U*ZB**T,D = QB*V*ZB**Twill be computed.== 'F': The matrix pencil(B,D)is already in generalized Schur form andU,V,QB, andZBare given.== 'H': The matrix pencil(B,D)is given in generalized Hessenberg form and its Schur decompositionB = QB*U*ZB**T,D = QB*V*ZB**Twill be computed.
TRANSAโ CHARACTER. Specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A== 'T':op1(A) = A**T
TRANSBโ CHARACTER. Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,== 'T':op2(B) = B**T
SGN1โ DOUBLE PRECISION, allowed values:+/-1. Specifies the sign between in the first equation.SGN2โ DOUBLE PRECISION, allowed values:+/-1. Specifies the sign between in the second equation.Mโ INTEGER. The order of the matricesAandC.M >= 0.Nโ INTEGER. The order of the matricesBandD.N >= 0.Aโ DOUBLE PRECISION array, dimension(LDA,M). IfFACT ==, the matrixAis a general matrix and it is overwritten with the (quasi-) upper triangular factorSof the Schur decomposition of(A,C). IfFACT ==, the matrixAcontains its (quasi-) upper triangular matrixSof the Schur decomposition of(A,C). IfFACT ==, the matrixAis an upper Hessenberg matrix of the generalized Hessenberg form(A,C)and it is overwritten with the (quasi-) upper triangular factorSof the Schur decomposition of(A,C).LDAโ INTEGER. The leading dimension of the arrayA.LDA >= max(1,M).Bโ DOUBLE PRECISION array, dimension(LDB,N). IfFACT == ,the matrixBis a general matrix and it is overwritten with the (quasi-) upper triangular factorUof the Schur decomposition of(B,D). IfFACT ==, the matrixBcontains its (quasi-) upper triangular matrixUof the Schur decomposition of(B,D). IfFACT ==, the matrixBis an upper Hessenberg matrix of the generalized Hessenberg form(B,D)and it is overwritten with the (quasi-) upper triangular factorUof the Schur decomposition of(B,D).LDBโ INTEGER. The leading dimension of the arrayB.LDB >= max(1,N).Cโ DOUBLE PRECISION array, dimension(LDC,M). IfFACT ==, the matrixCis a general matrix and it is overwritten with the upper triangular factorRof the Schur decomposition of(A,C). IfFACT ==, the matrixCcontains its upper triangular matrixRof the Schur decomposition of(A,C). IfFACT ==, the matrixCis the upper triangular matrix of the generalized Hessenberg form(A,C)and it is overwritten with the upper triangular factorRof the Schur decomposition of(A,C).LDCโ INTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDโ DOUBLE PRECISION array, dimension(LDD,N).- If
FACT ==, the matrix D is a general matrix and it is overwritten with the upper triangular factor V of the Schur decomposition of(B,D). - If
FACT ==, the matrix D contains its upper triangular matrix V of the Schur decomposition of(B,D). - If
FACT ==, the matrix D is the upper triangular matrix of the generalized Hessenberg form(B,D)and it is overwritten with the upper triangular factor V of the Schur decomposition of(B,D).
- If
LDDโ INTEGER. The leading dimension of the arrayD.LDD >= max(1,N). ๐QAโ DOUBLE PRECISION array, dimension(LDQA,M).- If
FACT ==, the matrix QA is an empty M-by-M matrix on input and contains the left Schur vectors of(A,C)on output. - If
FACT ==, the matrix QA contains the left Schur vectors of(A,C). - If
FACT ==, the matrix QA is an empty M-by-M matrix on input and contains the left Schur vectors of(A,C)on output.
- If
LDQAโ INTEGER. The leading dimension of the arrayQA.LDQA >= max(1,M). โจZAโ DOUBLE PRECISION array, dimension(LDZA,M).- If
FACT ==, the matrix ZA is an empty M-by-M matrix on input and contains the right Schur vectors of(A,C)on output. - If
FACT ==, the matrix ZA contains the right Schur vectors of(A,C). - If
FACT ==, the matrix ZA is an empty M-by-M matrix on input and contains the right Schur vectors of(A,C)on output.
- If
LDZAโ INTEGER. The leading dimension of the arrayZA.LDZA >= max(1,M). ๐QBโ DOUBLE PRECISION array, dimension(LDQB,N).- If
FACT ==, the matrix QB is an empty N-by-N matrix on input and contains the left Schur vectors of(B,D)on output. - If
FACT ==, the matrix QB contains the left Schur vectors of(B,D). - If
FACT ==, the matrix QB is an empty M-by-M matrix on input and contains the left Schur vectors of(B,D)on output. (yes bestie, it literally says M-by-M there, we're not touching it, the original said it and we said it ๐)
- If
LDQBโ INTEGER. The leading dimension of the arrayQB.LDQB >= max(1,N). ๐ฆZBโ DOUBLE PRECISION array, dimension(LDZB,N).- If
FACT ==, the matrix ZB is an empty N-by-N matrix on input and contains the right Schur vectors of(B,D)on output. - If
FACT ==, the matrix ZB contains the right Schur vectors of(B,D). - If
FACT ==, the matrix ZB is an empty M-by-M matrix on input and contains the right Schur vectors of(B,D)on output. (same situation as QB, M-by-M and all, we keep it exactly as written ๐)
- If
LDZBโ INTEGER. The leading dimension of the arrayZB.LDZB >= max(1,N). ๐ธEโ DOUBLE PRECISION array, dimension(LDE,N). On input, the matrix E contains the right hand side E. On output, the matrix E contains the solution R. ๐LDEโ INTEGER. The leading dimension of the arrayE.LDE >= max(1,M).Fโ DOUBLE PRECISION array, dimension(LDF,N). On input, the matrix F contains the right hand side F. On output, the matrix F contains the solution L. โจLDFโ INTEGER. The leading dimension of the arrayF.LDF >= max(1,M).SCALEโ DOUBLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. IfINFO == 0then SCALE is1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. ๐ฅWORKโ DOUBLE PRECISION array, dimension(MAX(1,LDWORK)). IfFACT ==, the matrix ZB is an empty M-by-M matrix on input and contains the right Schur vectors of(B,D)on output. Workspace for the algorithm. The optmimal workspace is returned in LDWORK, ifLDWORK == -1on input. In this case no computations are performed. ๐ญ (and yes, that first sentence is verbatim copy-paste energy from ZB up there, we're just reporting what the page says, not judging ๐ )LDWORKโ INTEGER. IfLDWORK == -1on input, 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โ INTEGER.== 0: successful exit ๐= 1:DHGGESfailed= 2:DLA_SORT_GEVfailed= 3: Inner solver failed< 0: ifINFO = -i, the i-th argument had an illegal value
See also โจ
DLA_TGCSYLV_DUAL_DAGDLA_TGCSYLV_DUAL_LEVEL3DLA_TGCSYLV_DUAL_L3_2SDLA_TGCSYLV_DUAL_L2DLA_TGCSYLV_DUAL_L2_LOCAL_COPY_32DLA_TGCSYLV_DUAL_L2_LOCAL_COPY_64DLA_TGCSYLV_DUAL_L2_LOCAL_COPY_96DLA_TGCSYLV_DUAL_L2_LOCAL_COPY_128DLA_TGCSYLV_DUAL_L2_LOCAL_COPY
Author ๐
Martin Koehler, MPI Magdeburg
Date ๐๏ธ
October 2025
Definition ๐
Definition at line 350 of file dla_ggcsylv_dual.f90.
subroutine dla_ggcsylv_dual_refine ๐ง
okay bestie, deep breath, this signature is long long. Here it is exactly, no cap:
subroutine dla_ggcsylv_dual_refine (character, dimension(1) transa,
character, dimension(1) transb, character, dimension(1) guess, double
precision sgn1, double precision sgn2, integer m, integer n, double
precision, dimension(lda, *) a, integer lda, double precision,
dimension(ldb, *) b, integer ldb, double precision, dimension(ldc, *) c,
integer ldc, double precision, dimension(ldd, *) d, integer ldd, double
precision, dimension(ldr, *) r, integer ldr, double precision,
dimension(ldl, *) l, integer ldl, double precision, dimension ( lde , *
) e, integer lde, double precision, dimension( ldf, *) f, integer ldf,
double precision, dimension(ldas, *) as, integer ldas, double precision,
dimension(ldbs,*) bs, integer ldbs, double precision, dimension(ldcs, *)
cs, integer ldcs, double precision, dimension(ldds, *) ds, integer ldds,
double precision, dimension(ldq, *) q, integer ldq, double precision,
dimension(ldz, *) z, integer ldz, double precision, dimension(ldu, *) u,
integer ldu, double precision, dimension(ldv, *) v, integer ldv, integer
maxit, double precision tau, double precision, dimension(*) convlog,
double precision, dimension(*) work, integer ldwork, integer info)
Iterative Refinement for the dual Coupled Generalized Sylvester Equations. ๐
Purpose ๐ฏ
!> DLA_GGCSYLV_DUAL_REFINE solves a coupled generalized Sylvester equation of the following forms
!>
!> op1(A)**T * R + op1(C)**T * L = SCALE * E (1)
!> SGN1 * R * op2(B)**T + SGN2 * L * op2(D)** T = SCALE * F
!>
!> where A and C are M-by-M matrices and B and D are N-by-N matrices.
!> The right hand sides E, F and the solutions R, L are M-by-N matrices.
!> The equation (1) is the dual to the generalized coupled Sylvester equation
!>
!> op1(A) * R + SGN1 * L * op2(B) = SCALE * E (2)
!> op1(C) * R + SGN2 * L * op2(D) = SCALE * F
!>
!> The equation (1) is the dual one to equation (2) with respect to the underlying linear system.
!> Let Z be the matrix formed by rewriting (2) into its Kronecker form. This yields
!>
!> | kron(I, op1(A)) SGN1*kron(op2(B)**T, I) | | Vec R | | Vec E |
!> Z X = | |*| | = | |
!> | kron(I, op1(C)) SGN2*kron(op2(D)**T, I) | | Vec L | | Vec F |
!>
!> Regarding Z**T one obtains
!>
!> | kron(I, op1(A)**T ) kron(I, op1(C)**T) | | Vec R | | Vec E |
!> Z**T X = | |*| | = | |
!> | SGN1*kron(op2(B), I) SGN2*kron(op2(D), I) | | Vec L | | Vec F |
!>
!> which belongs to the Sylvester equation (1). For this reason the parameters TRANSA and TRANSB
!> are expressed in terms of the Sylvester equation (2).
!> The pencils (A,C) and (B,D) need to be given in the original form as well
!> as in their generalized Schur decomposition since both are required in the
!> iterative refinement procedure.
!>
like, the duality is doing main character energy here fr fr โ one equation is the transpose-flavored twin of the other, and the Kronecker blocks are literally how you see it. ๐
Parameters ๐งฎ
TRANSAโ CHARACTER. Specifies the form of the system of equations with respect to A and C:== 'N':op1(A) = A== 'T':op1(A) = A**T
TRANSBโ CHARACTER. Specifies the form of the system of equations with respect to B and D:== 'N':op2(B) = B,== 'T':op2(B) = B**T
GUESSโ CHARACTER. Specifies whether (R,L) contains an initial guess or nor not. ๐= 'I': (R, L) contains an initial guess= 'N': No initial guess, (R,L) is set to zero at the begin of the iteration.
SGN1โ DOUBLE PRECISION, allowed values:+/-1. Specifies the sign between in the first equation. ๐ฅSGN2โ DOUBLE PRECISION, allowed values:+/-1. Specifies the sign between in the second equation. ๐ฅMโ INTEGER. The order of the matrices A and C.M >= 0.Nโ INTEGER. The order of the matrices B and D.N >= 0.Aโ DOUBLE PRECISION array, dimension(LDA,M). The array A contains the original matrix A defining the equation. โจLDAโ INTEGER. The leading dimension of the array A.LDA >= max(1,M).Bโ DOUBLE PRECISION array, dimension(LDB,N). The array B contains the original matrix B defining the equation. ๐ฆLDBโ INTEGER. The leading dimension of the array A.LDB >= max(1,N). (yes, it says "of the array A" โ that's what the page says, we keep it, no edits bestie ๐)CโCโC</p> is DOUBLE PRECISION array, dimension(LDC,M). It's holding the original matrix C that defines the equation, bestie. No cap.LDCโLDC</p> is INTEGER. The leading dimension of the arrayC. Constraint:LDC >= max(1,M). Respect it ๐DโD</p> is DOUBLE PRECISION array, dimension(LDD,N). The arrayDcontains the original matrix D defining the equation. She's the blueprint, okay?LDDโLDD</p> is INTEGER. The leading dimension of the arrayD.LDD >= max(1,N)๐ซถRโR</p> is DOUBLE PRECISION array, dimension(LDR,N). On input,Rholds the initial guess R0 for the first solution matrix. On output,Rholds the refine solution matrix R. Glow-up arc fr fr โจLDRโLDR</p> is INTEGER. The leading dimension of the arrayR.LDR >= max(1,M)LโL</p> is DOUBLE PRECISION array, dimension(LDL,N). On input,Lcontains the initial guess for the second solution matrix. On output,Lcontains the solutionL. She evolved ๐LDLโLDL</p> is INTEGER. The leading dimension of the arrayL.LDF >= max(1,M).
WAIT โ that's literally what the original says. It saysLDF >= max(1,M)right there in theLDLentry. I am not touching it, I am not "fixing" it, I'm just telling you bestie: yes, that's what's written. ๐
EโE</p> is DOUBLE PRECISION array, dimension(LDE,N). On input,Econtains the right hand side E.LDEโLDE</p> is INTEGER. The leading dimension of the arrayE.LDE >= max(1,M)FโF</p> is DOUBLE PRECISION array, dimension(LDF,N). On input,Fcontains the right hand side F.LDFโLDF</p> is INTEGER. The leading dimension of the arrayF.LDF >= max(1,M)ASโAS</p> is DOUBLE PRECISION array, dimension(LDAS,M). It holds the generalized Schur decomposition of theA. Iconic behavior.LDASโLDAS</p> is INTEGER. The leading dimension of the arrayAS.LDAS >= max(1,M)BSโBS</p> is DOUBLE PRECISION array, dimension(LDBS,N). It holds the generalized Schur decomposition of theB.LDBSโLDBS</p> is INTEGER. The leading dimension of the arrayBS.LDBS >= max(1,N)CSโCS</p> is DOUBLE PRECISION array, dimension(LDCS,M). It holds the generalized Schur decomposition of theC.LDCSโLDCS</p> is INTEGER. The leading dimension of the arrayCS.LDCS >= max(1,M)DSโDS</p> is DOUBLE PRECISION array, dimension(LDDS,N). It holds the generalized Schur decomposition of theD.LDDSโLDDS</p> is INTEGER. The leading dimension of the arrayDS.LDDS >= max(1,N)QโQ</p> is DOUBLE PRECISION array, dimension(LDQ,M). It's carrying the left generalized Schur vectors for(A,C)as returned byDGGES. Periodt.LDQโLDQ</p> is INTEGER. The leading dimension of the arrayQ.LDQ >= max(1,M)ZโZ</p> is DOUBLE PRECISION array, dimension(LDZ,M). It's carrying the right generalized Schur vectors for(A,C)as returned byDGGES. The duo ๐ซถLDZโLDZ</p> is INTEGER. The leading dimension of the arrayZ.LDZ >= max(1,M)UโU</p> is DOUBLE PRECISION array, dimension(LDU,N). It's carrying the left generalized Schur vectors for(B,D)as returned byDGGES.LDUโLDU</p> is INTEGER. The leading dimension of the arrayU.LDU >= max(1,N)VโV</p> is DOUBLE PRECISION array, dimension(LDV,N). It's carrying the right generalized Schur vectors for(B,D)as returned byDGGES.LDVโLDV</p> is INTEGER. The leading dimension of the arrayV.LDV >= max(1,N)MAXITโMAXIT</p> is INTEGER. On input,MAXITis the maximum number of iteration that are performed,2 <= MAXIT <= 100. On exit,MAXITholds the number of iteration steps taken by the algorithm. She's reporting back ๐TAUโTAU</p> is DOUBLE PRECISION. On input,TAUis the additional security factor for the stopping criterion, typical values are0.1. On exit,TAUis the last relative residual when the stopping criterion got valid. Safety first bestie ๐ก๏ธCONVLOGโCONVLOG</p> is DOUBLE PRECISION array, dimension(MAXIT). It's the convergence history of the iterative refinement.CONVLOG(I)contains the maximum relative residual of both equations before it is solved for the I-th time. It's literally the algorithm's diary ๐ธWORKโWORK</p> is DOUBLE PRECISION array, dimension(MAX(1,LDWORK)). Workspace for the algorithm. The optimal workspace is returned inLDWORKifLDWORK == -1on input. In this case no computations are performed.LDWORKโLDWORK</p> is 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. It's just a vibe check, nothing more ๐INFOโINFO</p> is INTEGER. The whole tea:== 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 ๐
Bestie, if you liked this one, you will be obsessed with her sisters:
DLA_TGCSYLV_DUAL_DAGDLA_TGCSYLV_DUAL_LEVEL3DLA_TGCSYLV_DUAL_L3_2SDLA_TGCSYLV_DUAL_L2DLA_TGCSYLV_DUAL_L2_LOCAL_COPY_32DLA_TGCSYLV_DUAL_L2_LOCAL_COPY_64DLA_TGCSYLV_DUAL_L2_LOCAL_COPY_96DLA_TGCSYLV_DUAL_L2_LOCAL_COPY_128DLA_TGCSYLV_DUAL_L2_LOCAL_COPY
๐ AUTHOR ๐
Martin Koehler, MPI Magdeburg ๐
๐ DATE ๐
October 2025
Definition at line 399 of file dla_ggcsylv_dual_refine.f90.
๐ฆ dla_ggcsylv_refine ๐ฆ
The actual signature, verbatim, no notes:
subroutine dla_ggcsylv_refine (character, dimension(1) transa, character,
dimension(1) transb, character, dimension(1) guess, double precision
sgn1, double precision sgn2, integer m, integer n, double precision,
dimension(lda, *) a, integer lda, double precision, dimension(ldb, *) b,
integer ldb, double precision, dimension(ldc, *) c, integer ldc, double
precision, dimension(ldd, *) d, integer ldd, double precision,
dimension(ldr, *) r, integer ldr, double precision, dimension(ldl, *) l,
integer ldl, double precision, dimension ( lde , * ) e, integer lde,
double precision, dimension( ldf, *) f, integer ldf, double precision,
dimension(ldas, *) as, integer ldas, double precision, dimension(ldbs,*)
bs, integer ldbs, double precision, dimension(ldcs, *) cs, integer ldcs,
double precision, dimension(ldds, *) ds, integer ldds, double precision,
dimension(ldq, *) q, integer ldq, double precision, dimension(ldz, *) z,
integer ldz, double precision, dimension(ldu, *) u, integer ldu, double
precision, dimension(ldv, *) v, integer ldv, integer maxit, double
precision tau, double precision, dimension(*) convlog, double precision,
dimension(*) work, integer ldwork, integer info)
Iterative Refinement for the Coupled Generalized Sylvester Equations.
โจ Purpose โจ
!> DLA_GGCSYLV_REFINE solves a coupled generalized Sylvester equation of the following forms
!>
!> op1(A) * R + SGN1 * L * op2(B) = E (1)
!> op1(C) * R + SGN2 * L * op2(D) = F
!>
!> with iterative refinement, Thereby (A,C) is a M-by-M matrix pencil and
!> (B,D) is a N-by-N matrix pencil.
!> The right hand side (E,F) and the solution (R,L) are M-by-N matrices.
!> The pencils (A,C) and (B,D) need to be given in the original form as well
!> as in their generalized Schur decomposition since both are required in the
!> iterative refinement procedure.
!>
Okay so real talk: (A,C) is an M-by-M matrix pencil, (B,D) is an N-by-N matrix pencil, the right hand side (E,F) and the solution (R,L) are M-by-N matrices. And both pencils gotta show up twice โ original form and generalized Schur decomposition โ because the iterative refinement needs both. She's demanding but she's worth it ๐
๐ Parameters ๐
TRANSAโTRANSA</p> is CHARACTER. Specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A== 'T':op1(A) = A**T
TRANSBโTRANSB</p> is CHARACTER. Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,== 'T':op2(B) = B**T
GUESSโGUESS</p> is CHARACTER. Tells us whether(R,L)already contains an initial guess or not.= 'I':(R, L)contains an initial guess= 'N': No initial guess,(R,L)is set to zero at the begin of the iteration.
SGN1โSGN1</p> is DOUBLE PRECISION, allowed values:+/-1. Specifies the sign between in the first equation.SGN2โSGN2</p> is DOUBLE PRECISION, allowed values:+/-1. Specifies the sign between in the second equation.MโM</p> is INTEGER. The order of the matricesAandC.M >= 0.NโN</p> is INTEGER. The order of the matricesBandD.N >= 0.AโA</p> is DOUBLE PRECISION array, dimension(LDA,M). The arrayAcontains the original matrix A defining the equation.LDAโLDA</p> is INTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโB</p> is DOUBLE PRECISION array, dimension(LDB,N). The arrayBcontains the original matrix B defining the equation.LDBโLDB</p> is INTEGER. The leading dimension of the arrayA.LDB >= max(1,N).
Yes bestie, theLDBentry says "leading dimension of the arrayA". That's the original wording. I'm keeping it exactly, don't come for me ๐
CโC</p> is DOUBLE PRECISION array, dimension(LDC,M). The arrayCcontains the original matrix C defining the equation.LDCโCโ okay soCis aDOUBLE PRECISIONarray, dimension(LDC,N), and the arrayCcontains the original matrixCdefining the equation. ๐LDCโLDCisINTEGER, the leading dimension of the arrayC. And bestie,LDC >= max(1,M)or we simply do not go. โจDโDis aDOUBLE PRECISIONarray, dimension(LDD,N). The arrayDcontains the original matrixDdefining the equation. ๐ฆLDDโLDDisINTEGER, the leading dimension of the arrayD.LDD >= max(1,N). ๐ธRโRis aDOUBLE PRECISIONarray, dimension(LDR,N). On input, the arrayRcontains the initial guessR0for the first solution matrix. On output, the arrayRcontains the refine solution matrixR. She's evolving, we love that for her. ๐LDRโLDRisINTEGER, the leading dimension of the arrayR.LDR >= max(1,M). ๐LโLis aDOUBLE PRECISIONarray, dimension(LDL,N). On input, the arrayLcontains the initial guess for the second solution matrix. On output, the arrayLcontains the solutionL. โจLDLโLDLisINTEGER, the leading dimension of the arrayL. And then the page saysLDF >= max(1,M)โ yes,LDF, right there under theLDLentry. Not my typo, not my problem, that is literally what it says ๐.EโEis aDOUBLE PRECISIONarray, dimension(LDE,N). On input, the arrayEcontains the right hand sideE. ๐ซถLDEโLDEisINTEGER, the leading dimension of the arrayE.LDE >= max(1,M). ๐FโFis aDOUBLE PRECISIONarray, dimension(LDF,N). On input, the arrayFcontains the right hand sideF. ๐LDFโLDFisINTEGER, the leading dimension of the arrayF.LDF >= max(1,M). ๐ASโASis aDOUBLE PRECISIONarray, dimension(LDAS,M). The arrayAScontains the generalized Schur decomposition of theA. ๐LDASโLDASisINTEGER, the leading dimension of the arrayAS.LDAS >= max(1,M). โจBSโBSis aDOUBLE PRECISIONarray, dimension(LDBS,N). The arrayBScontains the generalized Schur decomposition of theB. ๐ฆLDBSโLDBSisINTEGER, the leading dimension of the arrayBS.LDBS >= max(1,N). ๐ธCSโCSis aDOUBLE PRECISIONarray, dimension(LDCS,M). The arrayCScontains the generalized Schur decomposition of theC. ๐LDCSโLDCSisINTEGER, the leading dimension of the arrayCS.LDCS >= max(1,M). ๐DSโDSis aDOUBLE PRECISIONarray, dimension(LDDS,N). The arrayDScontains the generalized Schur decomposition of theD. ๐LDDSโLDDSisINTEGER, the leading dimension of the arrayDS.LDDS >= max(1,N). โญQโQis aDOUBLE PRECISIONarray, dimension(LDQ,M). The arrayQcontains the left generalized Schur vectors for(A,C)as returned byDGGES. ๐LDQโLDQisINTEGER, the leading dimension of the arrayQ.LDQ >= max(1,M). ๐ZโZis aDOUBLE PRECISIONarray, dimension(LDZ,M). The arrayZcontains the right generalized Schur vectors for(A,C)as returned byDGGES. โจLDZโLDZisINTEGER, the leading dimension of the arrayZ.LDZ >= max(1,M). ๐UโUis aDOUBLE PRECISIONarray, dimension(LDU,N). The arrayUcontains the left generalized Schur vectors for(B,D)as returned byDGGES. ๐ฆLDUโLDUisINTEGER, the leading dimension of the arrayU.LDU >= max(1,N). ๐ธVโVis aDOUBLE PRECISIONarray, dimension(LDV,N). The arrayVcontains the right generalized Schur vectors for(B,D)as returned byDGGES. ๐LDVโLDVisINTEGER, the leading dimension of the arrayV.LDV >= max(1,N). โญMAXITโMAXITisINTEGER. On input,MAXITcontains the maximum number of iteration that are performed, and2 <= MAXIT <= 100okay, that's the range, respect it. On exit,MAXITcontains the number of iteration steps taken by the algorithm. 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. ๐CONVLOGโCONVLOGis aDOUBLE PRECISIONarray, dimension(MAXIT). TheCONVLOGarray contains the convergence history of the iterative refinement.CONVLOG(I)contains the maximum relative residual of both equations before it is solved for theI-th time. It's giving โจcharacter development arcโจ fr fr.WORKโWORKis aDOUBLE 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. ๐ซถ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โINFOisINTEGER, and here's the whole mood board:== 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_TGCSYLV_DAGDLA_TGCSYLV_LEVEL3DLA_TGCSYLV_L3_2SDLA_TGCSYLV_L2_UNOPTDLA_TGCSYLV_L2DLA_TGCSYLV_L2_REORDERDLA_TGCSYLV_L2_LOCAL_COPY_32DLA_TGCSYLV_L2_LOCAL_COPY_64DLA_TGCSYLV_L2_LOCAL_COPY_96DLA_TGCSYLV_L2_LOCAL_COPY_128DLA_TGCSYLV_L2_LOCAL_COPY
โ๏ธ Author โ๏ธ
Martin Koehler, MPI Magdeburg
๐ Date ๐
October 2025
Definition at line 381 of file dla_ggcsylv_refine.f90.
๐ subroutine dla_ggsylv ๐
subroutine dla_ggsylv (character, dimension(1) facta, character,
dimension(1) factb, character, dimension(1) transa, character,
dimension(1) transb, double precision sgn, integer m, integer n, double
precision, dimension(lda,*) a, integer lda, double precision,
dimension(ldb, *) b, integer ldb, double precision, dimension(ldc, *) c,
integer ldc, double precision, dimension(ldd,*) d, integer ldd, double
precision, dimension(ldqa, *) qa, integer ldqa, double precision,
dimension(ldza, *) za, integer ldza, double precision, dimension(ldqb,
*) qb, integer ldqb, double precision, dimension(ldzb, *) zb, integer
ldzb, double precision, dimension(ldx, *) x, integer ldx, double
precision scale, double precision, dimension(*) work, integer ldwork,
integer info)
Frontend for the solution of Generalized Sylvester Equations. ๐
๐ฏ Purpose ๐ฏ
Okay bestie, listen up, because DLA_GGSYLV solves a generalized Sylvester equation of the following forms:
op1(A) * X * op2(B) + op1(C) * X * op2(D) = SCALE * Y (1)
or
op1(A) * X * op2(B) - op1(C) * X * op2(D) = SCALE * Y (2)
where (A,C) is a M-by-M matrix pencil and (B,D) is a N-by-N matrix pencil. The right hand side Y and the solution X are M-by-N matrices. The pencils (A,C) and (B,D) can be either given as general unreduced matrices, as generalized Hessenberg form, or in terms of their generalized Schur decomposition. If they are given as general matrices or as a generalized Hessenberg form their generalized Schur decomposition will be computed. ๐ฆ
Not me reading that three times to make sure I got the pencil sizes right โM-by-Mfor(A,C),N-by-Nfor(B,D),XandYare M-by-N. Write it down. ๐
๐ Parameters ๐
FACTAโFACTAisCHARACTER. Specifies how the matrix pencil(A,C)is given. ๐== 'N': The matrix pencil(A,C)is given as a general matrices and its Schur decompositionA = QA*S*ZA**T,C = QA*R*ZA**Twill be computed.== 'F': The matrix pencil(A,C)is already in generalized Schur form andS,R,QA, andZAare given.== 'H': The matrix pencil(A,C)is given in generalized Hessenberg form and its Schur decompositionA = QA*S*ZA**T,C = QA*R*ZA**Twill be computed.
FACTBโFACTBisCHARACTER. Specifies how the matrix pencil(B,D)is given. โจ== 'N': The matrix pencil(B,D)is given as a general matrices and its Schur decompositionB = QB*U*ZB**T,D = QB*V*ZB**Twill be computed.== 'F': The matrix pencil(B,D)is already in generalized Schur form andU,V,QB, andZBare given.== 'H': The matrix pencil(B,D)is given in generalized Hessenberg form and its Schur decompositionB = QB*U*ZB**T,D = QB*V*ZB**Twill be computed.
TRANSAโTRANSAisCHARACTER. Specifies the form of the system of equations with respect toAandC: ๐ธ== 'N':op1(A) = A== 'T':op1(A) = A**T
TRANSBโTRANSBisCHARACTER. Specifies the form of the system of equations with respect toBandD: ๐ธ== 'N':op2(B) = B,== 'T':op2(B) = B**T
SGNโSGNisDOUBLE PRECISION, allowed values:+/-1. Specifies the sign between the two parts of the Sylvester equation. ๐= 1: Solve Equation (1)== -1: Solve Equation (2)
MโMisINTEGER. The order of the matricesAandC.M >= 0. ๐NโNisINTEGER. The order of the matricesBandD.N >= 0. ๐AโAโDOUBLE PRECISIONarray, dimension(LDA,M)โ okay so this is the moment, bestie ๐ซถ here's whatAis doing in each case:- If
FACT ==, thenAis a general matrix, and it gets overwritten with the (quasi-) upper triangular factorSof the Schur decomposition of(A,C). ๐ - If
FACT ==, thenAalready contains its (quasi-) upper triangular matrixSof the Schur decomposition of(A,C). - If
FACT ==, thenAis an upper Hessenberg matrix of the generalized Hessenberg form(A,C), and it gets overwritten with the (quasi-) upper triangular factorSof the Schur decomposition of(A,C). ๐ฅ
- If
Real talk: the value that belongs after each FACT == is blank in the source, and I am not out here inventing values. ๐ Left exactly as-is, no cap.
LDAโINTEGERโ the leading dimension of the arrayA, and the rule isLDA >= max(1,M). That's it, that's the law. โจBโDOUBLE PRECISIONarray, dimension(LDB,N)โ same energy asA, but for the(B,D)pencil:- If
FACT ==, thenBis a general matrix, and it is overwritten with the (quasi-) upper triangular factorUof the Schur decomposition of(B,D). ๐ - If
FACT ==, thenBcontains its (quasi-) upper triangular matrixUof the Schur decomposition of(B,D). - If
FACT ==, thenBis an upper Hessenberg matrix of the generalized Hessenberg form(B,D), and it is overwritten with the (quasi-) upper triangular factorUof the Schur decomposition of(B,D). ๐ฅ
- If
LDBโINTEGERโ leading dimension ofB, andLDB >= max(1,N). Periodt. ๐CโDOUBLE PRECISIONarray, dimension(LDC,M)โ note this one gives you a plain upper triangular factor, not a quasi one, iykyk:- If
FACT ==, thenCis a general matrix, and it is overwritten with the upper triangular factorRof the Schur decomposition of(A,C). ๐ - If
FACT ==, thenCcontains its upper triangular matrixRof the Schur decomposition of(A,C). - If
FACT ==, thenCis the upper triangular matrix of the generalized Hessenberg form(A,C), and it is overwritten with the upper triangular factorRof the Schur decomposition of(A,C). โจ
- If
LDCโINTEGERโ leading dimension ofC, andLDC >= max(1,M). ๐DโDOUBLE PRECISIONarray, dimension(LDD,N)โ the(B,D)twin ofC:- If
FACT ==, thenDis a general matrix, and it is overwritten with the upper triangular factorVof the Schur decomposition of(B,D). ๐ฆ - If
FACT ==, thenDcontains its upper triangular matrixVof the Schur decomposition of(B,D). - If
FACT ==, thenDis the upper triangular matrix of the generalized Hessenberg form(B,D), and it is overwritten with the upper triangular factorVof the Schur decomposition of(B,D). โจ
- If
LDDโINTEGERโ leading dimension ofD, andLDD >= max(1,N). ๐QAโDOUBLE PRECISIONarray, dimension(LDQA,M)โ left Schur vectors of(A,C)live here:- If
FACT ==, thenQAis an empty M-by-M matrix on input, and on output it contains the left Schur vectors of(A,C). ๐ธ - If
FACT ==, thenQAcontains the left Schur vectors of(A,C). - If
FACT ==, thenQAis an empty M-by-M matrix on input, and on output it contains the left Schur vectors of(A,C). ๐ธ
- If
LDQAโINTEGERโ leading dimension ofQA, andLDQA >= max(1,M). โจZAโDOUBLE PRECISIONarray, dimension(LDZA,M)โ right Schur vectors of(A,C), coming through:- If
FACT ==, thenZAis an empty M-by-M matrix on input, and on output it contains the right Schur vectors of(A,C). ๐ฆ - If
FACT ==, thenZAcontains the right Schur vectors of(A,C). - If
FACT ==, thenZAis an empty M-by-M matrix on input, and on output it contains the right Schur vectors of(A,C). ๐ฆ
- If
LDZAโINTEGERโ leading dimension ofZA, andLDZA >= max(1,M). โจQBโDOUBLE PRECISIONarray, dimension(LDQB,N)โ left Schur vectors of(B,D):- If
FACT ==, thenQBis an empty N-by-N matrix on input, and on output it contains the left Schur vectors of(B,D). ๐ - If
FACT ==, thenQBcontains the left Schur vectors of(B,D). - If
FACT ==, thenQBis an empty M-by-M matrix on input, and on output it contains the left Schur vectors of(B,D). ๐ญ (yes it really says M-by-M in that last one, I'm not the one who wrote it, I'm just the messenger)
- If
LDQBโINTEGERโ leading dimension ofQB, andLDQB >= max(1,N). โจZBโDOUBLE PRECISIONarray, dimension(LDZB,N)โ right Schur vectors of(B,D):- If
FACT ==, thenZBis an empty N-by-N matrix on input, and on output it contains the right Schur vectors of(B,D). ๐ - If
FACT ==, thenZBcontains the right Schur vectors of(B,D). - If
FACT ==, thenZBis an empty M-by-M matrix on input, and on output it contains the right Schur vectors of(B,D). ๐ญ (again with the M-by-M, ok)
- If
LDZBโINTEGERโ leading dimension ofZB, andLDZB >= max(1,N). โจXโDOUBLE PRECISIONarray, dimension(LDX,N)โ she's the main character, the solution goes here:- On input,
Xholds the right hand sideY. ๐ซถ - On output,
Xholds the solution of Equation (1) or (2). - Both the right hand side
Yand the solutionXare M-by-N matrices. ๐
- On input,
LDXโINTEGERโ leading dimension ofX, andLDX >= max(1,M). โจSCALEโDOUBLE PRECISIONโ a scaling factor whose whole job is keeping the result from overflowing. ๐- If
INFO == 0, thenSCALEis1.0D0. - Otherwise, if one of the inner systems could not be solved correctly,
0 < SCALE <= 1holds true. ๐จ
- If
WORKโDOUBLE PRECISIONarray, dimension(MAX(1,LDWORK))โ the workspace for the algorithm. The optimal workspace is handed to you either by\ref mepack_memory_frontendor by a previous call to this routine withLDWORK === -1. ๐งฐLDWORKโINTEGERโ the size of the workspace for the algorithm. You can figure it out with a call to\ref mepack_memory_frontend. Alternatively, ifLDWORK == -1on input, the subroutine just returns the required workspace size inLDWORKand performs zero computations. Not a single one. ๐INFOโINTEGERโ the vibe check at the end:== 0: successful exit ๐= 1:DHGGESfailed= 2:DLA_SORT_GEVfailed= 3: Inner solver failed< 0: ifINFO = -i, the i-th argument had an illegal value ๐จ
๐ See also
DLA_TGSYLV_DAGDLA_TGSYLV_L3_COLWISEDLA_TGSYLV_L3_2SDLA_TGSYLV_L2_REORDERDLA_TGSYLV_L2DLA_TGSYLV_L2_COLWISEDLA_TGSYLV_L2_LOCAL_COPY_32DLA_TGSYLV_L2_LOCAL_COPY_64DLA_TGSYLV_L2_LOCAL_COPY_96DLA_TGSYLV_L2_LOCAL_COPY_128DLA_TGSYLV_L2_LOCAL_COPYDLA_TGSYLV_GARDINER_LAUB
โ๏ธ Author
Martin Koehler, MPI Magdeburg ๐
๐ Date
October 2025 ๐๏ธ
Definition at line 322 of file dla_ggsylv.f90. ๐
๐ dla_ggsylv_refine
Okay bestie, deep breath, because this signature is long and I love her for it. ๐
subroutine dla_ggsylv_refine (character, dimension(1) transa, character,
dimension(1) transb, character, dimension(1) guess, double precision
sgn, integer m, integer n, double precision, dimension(lda, *) a,
integer lda, double precision, dimension(ldb, *) b, integer ldb, double
precision, dimension(ldc, *) c, integer ldc, double precision,
dimension(ldd, *) d, integer ldd, 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(ldcs, *)
cs, integer ldcs, double precision, dimension(ldds, *) ds, integer ldds,
double precision, dimension(ldq, *) q, integer ldq, double precision,
dimension(ldz, *) z, integer ldz, double precision, dimension(ldu, *) u,
integer ldu, double precision, dimension(ldv, *) v, integer ldv, integer
maxit, double precision tau, double precision, dimension(*) convlog,
double precision, dimension(*) work, integer ldwork, integer info)
Iterative Refinement for the Generalized Sylvester Equations. ๐ซถ
๐ฏ Purpose
DLA_GGSYLV_REFINE solves a generalized Sylvester equation that looks like this:
op1(A) * X * op2(B) + SGN * op1(C) * X * op2(D) = Y (1)
...and it does it with iterative refinement. ๐
Thereby (A,C) is a M-by-M matrix pencil and (B,D) is a N-by-N matrix pencil. The right hand side Y and the solution X are M-by-N matrices. And here's the tea: the pencils (A,C) and (B,D) need to be given in the original form as well as in their generalized Schur decomposition, because the iterative refinement procedure needs both. Both. No skipping. ๐ญ
๐งฉ Parameters
TRANSAโCHARACTERโ specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A== 'T':op1(A) = A**T
TRANSBโCHARACTERโ specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,== 'T':op2(B) = B**T
GUESSโCHARACTERโ tells us whetherXis coming in with an initial guess or not:= 'I':Xcontains an initial guess ๐= 'N': no initial guess, soXgets set to zero at the beginning of the iteration. ๐
SGNโDOUBLE PRECISION, allowed values:+/-1โ specifies the sign in the first equation. โโMโINTEGERโ the order of the matricesAandC.M >= 0. โจNโINTEGERโ the order of the matricesBandD.N >= 0. โจAโDOUBLE PRECISIONarray, dimension(LDA,M)โ the arrayAcontains the original matrixAdefining the eqaution. ๐ธLDALDAโLDA is INTEGER. Leading dimension of arrayA.LDA >= max(1,M)or it's a no. ๐BโB is DOUBLE PRECISION array, dimension (LDB,N). This array holds the original matrixBdefining the equation. โจLDBโLDB is INTEGER. Leading dimension ofB.LDB >= max(1,N). ๐ซถCโC is DOUBLE PRECISION array, dimension (LDC,M). It contains the original matrixCdefining the equation. ๐ธLDCโLDC is INTEGER. Leading dimension ofC.LDC >= max(1,M). ๐DโD is DOUBLE PRECISION array, dimension (LDD,N). It contains the original matrixDdefining the equation. ๐LDDโLDD is INTEGER. Leading dimension ofD.LDD >= max(1,N). ๐ฆXโX is DOUBLE PRECISION array, dimension (LDX,N).- On input,
Xholds the initial guess, ifGUESS = 'I'. - On output,
Xholds the solutionX. ๐
- On input,
LDXโLDX is INTEGER. Leading dimension ofX.LDX >= max(1,M). ๐YโY is DOUBLE PRECISION array, dimension (LDY,N).- On input,
Yholds the right hand sideY. - The array stays unchanged during the iteration. ๐
- On input,
LDYโLDY is INTEGER. Leading dimension ofY.LDY >= max(1,M). โญASโAS is DOUBLE PRECISION array, dimension (LDAS,M). The arrayAScontains the generalized Schur decomposition ofA. ๐ฅLDASโLDAS is INTEGER. Leading dimension ofAS.LDAS >= max(1,M). ๐BSโBS is DOUBLE PRECISION array, dimension (LDBS,N). The arrayBScontains the generalized Schur decomposition ofB. โจLDBSโLDBS is INTEGER. Leading dimension ofBS.LDBS >= max(1,N). ๐CSโCS is DOUBLE PRECISION array, dimension (LDCS,M). The arrayCScontains the generalized Schur decomposition ofC. ๐ธLDCSโLDCS is INTEGER. Leading dimension ofCS.LDCS >= max(1,M). ๐DSโDS is DOUBLE PRECISION array, dimension (LDDS,N). The arrayDScontains the generalized Schur decomposition ofD. ๐LDDSโLDDS is INTEGER. Leading dimension ofDS.LDDS >= max(1,N). ๐ฆQโQ is DOUBLE PRECISION array, dimension (LDQ,M). The arrayQcontains the left generalized Schur vectors for(A,C)as returned byDGGES. ๐ฅLDQโLDQ is INTEGER. Leading dimension ofQ.LDQ >= max(1,M). โญZโZ is DOUBLE PRECISION array, dimension (LDZ,M). The arrayZcontains the right generalized Schur vectors for(A,C)as returned byDGGES. ๐LDZโLDZ is INTEGER. Leading dimension ofZ.LDZ >= max(1,M). ๐UโU is DOUBLE PRECISION array, dimension (LDU,N). The arrayUcontains the left generalized Schur vectors for(B,D)as returned byDGGES. ๐ฅLDUโLDU is INTEGER. Leading dimension ofU.LDU >= max(1,N). ๐VโV is DOUBLE PRECISION array, dimension (LDV,N). The arrayVcontains the right generalized Schur vectors for(B,D)as returned byDGGES. โจLDVโLDV is INTEGER. Leading dimension ofV.LDV >= max(1,N). ๐MAXITโMAXIT is INTEGER.- On input,
MAXITholds the maximum number of iteration that are performed,2 <= MAXIT <= 100. - On exit,
MAXITholds the number of iteration steps taken by the algorithm. ๐ซถ
- On input,
TAUโTAU is DOUBLE PRECISION.- On input,
TAUholds the additional security factor for the stopping criterion, typical values are0.1. - On exit,
TAUholds the last relative residual when the stopping criterion got valid. ๐ธ
- On input,
CONVLOGโCONVLOG is DOUBLE PRECISION 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โWORK is DOUBLE PRECISION array, dimension (MAX(1,LDWORK)). Workspace for the algorithm. The optimal workspace is returned inLDWORK, ifLDWORK == -1on input. In this case no computations are performed. ๐LDWORKโLDWORK is 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โINFO is INTEGER. Here's the tea:== 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 ๐
DLA_TGSYLV_DAGDLA_TGSYLV_LEVEL3DLA_TGSYLV_L3_2SDLA_TGSYLV_L2_UNOPTDLA_TGSYLV_L2DLA_TGSYLV_L2_REORDERDLA_TGSYLV_L2_LOCAL_COPY_32DLA_TGSYLV_L2_LOCAL_COPY_64DLA_TGSYLV_L2_LOCAL_COPY_96DLA_TGSYLV_L2_LOCAL_COPY_128DLA_TGSYLV_L2_LOCAL_COPYDLA_TGSYLV_GARDINER_LAUB
โจ Author โจ
Martin Koehler, MPI Magdeburg
๐ Date ๐
October 2025
Definition at line 349 of file dla_ggsylv_refine.f90.
๐ง Author ๐ง
Generated automatically by Doxygen for MEPACK from the source code.
Okay bestie, that's the whole vibe. This page is version 1.1.2, dated Thu Oct 9 2025 00:00:00, and it's dblggsylv(3). Slay. ๐โจ
๐ฆ 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