residual - Man Page

Name

residual — Residual Computations

— This collection computes the relative residuals of the matrix equations.  

Synopsis

Topics

C-Interface
C-Interface for the residual computations.

Functions

double precision function dla_residual_csylv (transa, transb, sgn1, sgn2, m, n, a, lda, b, ldb, c, ldc, d, ldd, r, ldr, l, ldl, e, lde, f, ldf, scale)
Compute the relative residual for the coupled Sylvester equation.
double precision function dla_residual_csylv_dual (transa, transb, sgn1, sgn2, m, n, a, lda, b, ldb, c, ldc, d, ldd, r, ldr, l, ldl, e, lde, f, ldf, scale)
Compute the relative residual for the dual coupled Sylvester equation.
double precision function dla_residual_glyap (trans, m, a, lda, b, ldb, x, ldx, y, ldy, scale)
Compute the relative residual for the generalized Lyapunov equation.
double precision function dla_residual_gstein (trans, m, a, lda, b, ldb, x, ldx, y, ldy, scale)
Compute the relative residual for the generalized Stein equation.
double precision function dla_residual_gsylv (transa, transb, sgn, m, n, a, lda, b, ldb, c, ldc, d, ldd, x, ldx, y, ldy, scale)
Compute the relative residual for the generalized Sylvester equation.
double precision function dla_residual_lyap (trans, m, a, lda, x, ldx, y, ldy, scale)
Compute the relative residual for the Lyapunov equation.
double precision function dla_residual_stein (trans, m, a, lda, x, ldx, y, ldy, scale)
Compute the relative residual for the Stein equation.
double precision function dla_residual_sylv (transa, transb, sgn, m, n, a, lda, b, ldb, x, ldx, y, ldy, scale)
Compute the relative residual for the Sylvester equation.
double precision function dla_residual_sylv2 (transa, transb, sgn, m, n, a, lda, b, ldb, x, ldx, y, ldy, scale)
Compute the relative residual for the discrete-time Sylvester equation.
real function sla_residual_csylv (transa, transb, sgn1, sgn2, m, n, a, lda, b, ldb, c, ldc, d, ldd, r, ldr, l, ldl, e, lde, f, ldf, scale)
Compute the relative residual for the coupled Sylvester equation.
real function sla_residual_csylv_dual (transa, transb, sgn1, sgn2, m, n, a, lda, b, ldb, c, ldc, d, ldd, r, ldr, l, ldl, e, lde, f, ldf, scale)
Compute the relative residual for the dual coupled Sylvester equation.
real function sla_residual_glyap (trans, m, a, lda, b, ldb, x, ldx, y, ldy, scale)
Compute the relative residual for the generalized Lyapunov equation.
real function sla_residual_gstein (trans, m, a, lda, b, ldb, x, ldx, y, ldy, scale)
Compute the relative residual for the generalized Stein equation.
real function sla_residual_gsylv (transa, transb, sgn, m, n, a, lda, b, ldb, c, ldc, d, ldd, x, ldx, y, ldy, scale)
Compute the relative residual for the generalized Sylvester equation.
real function sla_residual_lyap (trans, m, a, lda, x, ldx, y, ldy, scale)
Compute the relative residual for the Lyapunov equation.
real function sla_residual_stein (trans, m, a, lda, x, ldx, y, ldy, scale)
Compute the relative residual for the Stein equation.
real function sla_residual_sylv (transa, transb, sgn, m, n, a, lda, b, ldb, x, ldx, y, ldy, scale)
Compute the relative residual for the Sylvester equation.
real function sla_residual_sylv2 (transa, transb, sgn, m, n, a, lda, b, ldb, x, ldx, y, ldy, scale)
Compute the relative residual for the discrete-time Sylvester equation.

Detailed Description

This collection computes the relative residuals of the matrix equations.

The routines in this group compute the relative residuals of the matrix equations. In contrast to the computational routines, these routines mange the memory on their own, making them easier to use from Fortran and C.

Function Documentation

double precision function dla_residual_csylv (character transa, character 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(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 scale)

Compute the relative residual for the coupled Sylvester equation.

Purpose:

!>
!> Compute the relative residual of the coupled Sylvester equation
!>
!>  RelRes = max( || SCALE*E - opA(A)*R - SGN1 * L *opB(B) || / ( (||A||*||R||+||B||*||L||) + SCALE * ||E|| ),
!>                || SCALE*F - opA(C)*R - SGN2 * L *opB(D) || / ( (||C||*||R||+||D||*||L||) + SCALE * ||F|| ))    (1)
!>
!> The norms are evaluated in terms of the Frobenius norm.
!>
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANSA

!>          TRANSA is CHARACTER(1)
!>          Specifies the form of the system of equations with respect to A :
!>          == 'N':  opA(A) = A (No transpose for A)
!>          == 'T':  opA(A) = A**T (Transpose A)
!>

TRANSB

!>          TRANSB is CHARACTER(1)
!>          Specifies the form of the system of equations with respect to B :
!>          == 'N':  opB(B) = B (No transpose for B)
!>          == 'T':  opB(B) = B**T (Transpose B)
!>

SGN1

!>          SGN1 is DOUBLE PRECISION, allowed values: +/-1
!>          Specifies the sign between the two parts of the first equation.
!>

SGN2

!>          SGN2 is DOUBLE PRECISION, allowed values: +/-1
!>          Specifies the sign between the two parts of the second equation.
!>

M

!>          M is INTEGER
!>          The order of the matrix A.  M >= 0.
!>

N

!>          N is INTEGER
!>          The order of the matrix B.  N >= 0.
!>

A

!>          A is DOUBLE PRECISION array, dimension (LDA,M)
!>          The coefficient matrix A.
!>

LDA

!>          LDA is INTEGER
!>          The leading dimension of the array A.  LDA >= max(1,M).
!>

B

!>          B is DOUBLE PRECISION array, dimension (LDB,N)
!>          The coefficient matrix B.
!>

LDB

!>          LDB is INTEGER
!>          The leading dimension of the array A.  LDB >= max(1,N).
!>

C

!>          C is DOUBLE PRECISION array, dimension (LDC,M)
!>          The coefficient matrix 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)
!>          The coefficient matrix D.
!>

LDD

!>          LDD is INTEGER
!>          The leading dimension of the array A.  LDD >= max(1,N).
!>

R

!>          R is DOUBLE PRECISION array, dimension (LDR,N)
!>          First part of the solution of the Sylvester Equation.
!>

LDR

!>          LDR is INTEGER
!>          The leading dimension of the array R.  LDR >= max(1,M).
!>

L

!>          L is DOUBLE PRECISION array, dimension (LDL,N)
!>          Second part of the solution of the Sylvester Equation.
!>

LDL

!>          LDL is INTEGER
!>          The leading dimension of the array L.  LDL >= max(1,M).
!>

E

!>          E is DOUBLE PRECISION array, dimension (LDE,N)
!>          The first right hand side of the Sylvester Equation.
!>

LDE

!>          LDE is INTEGER
!>          The leading dimension of the array E.  LDE >= max(1,M).
!>

F

!>          F is DOUBLE PRECISION array, dimension (LDF,N)
!>          The second right hand side of the Sylvester Equation.
!>

LDF

!>          LDF is INTEGER
!>          The leading dimension of the array F.  LDF >= max(1,M).
!>

SCALE

!>          SCALE is DOUBLE PRECISION
!>          SCALE is a scaling factor to prevent the overflow in the result.
!>

Returns

!>          The function returns the relative residual as defined in (1). If an error
!>          occurs a negative integer I is returned, signalizing that the parameter -I
!>          has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
!> .fi
Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 204 of file res_csylv.f90.

double precision function dla_residual_csylv_dual (character transa, character 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(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 scale)

Compute the relative residual for the dual coupled Sylvester equation.

Purpose:

!>
!> Compute the relative residual of the dual coupled Sylvester equation
!>
!>  RelRes = max( || SCALE*E - opA(A)**T *R - opA(C) ** T *L || / ( (||A||*||R||+||C||*||L||) + SCALE * ||E|| ),
!>                || SCALE*F - SGN1 * R  * opB(B)**T - SGN2 * L * opB(D) **T || / ( (||B||*||R||+||D||*||L||) + SCALE * ||F||)) (1)
!>
!> The norms are evaluated in terms of the Frobenius norm.
!>
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANSA

!>          TRANSA is CHARACTER(1)
!>          Specifies the form of the system of equations with respect to A :
!>          == 'N':  opA(A) = A (No transpose for A)
!>          == 'T':  opA(A) = A**T (Transpose A)
!>

TRANSB

!>          TRANSB is CHARACTER(1)
!>          Specifies the form of the system of equations with respect to B :
!>          == 'N':  opB(B) = B (No transpose for B)
!>          == 'T':  opB(B) = B**T (Transpose B)
!>

SGN1

!>          SGN1 is DOUBLE PRECISION, allowed values: +/-1
!>          Specifies the sign between the two parts of the first equation.
!>

SGN2

!>          SGN2 is DOUBLE PRECISION, allowed values: +/-1
!>          Specifies the sign between the two parts of the second equation.
!>

M

!>          M is INTEGER
!>          The order of the matrix A.  M >= 0.
!>

N

!>          N is INTEGER
!>          The order of the matrix B.  N >= 0.
!>

A

!>          A is DOUBLE PRECISION array, dimension (LDA,M)
!>          The coefficient matrix A.
!>

LDA

!>          LDA is INTEGER
!>          The leading dimension of the array A.  LDA >= max(1,M).
!>

B

!>          B is DOUBLE PRECISION array, dimension (LDB,N)
!>          The coefficient matrix B.
!>

LDB

!>          LDB is INTEGER
!>          The leading dimension of the array A.  LDB >= max(1,N).
!>

C

!>          C is DOUBLE PRECISION array, dimension (LDC,M)
!>          The coefficient matrix 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)
!>          The coefficient matrix D.
!>

LDD

!>          LDD is INTEGER
!>          The leading dimension of the array A.  LDD >= max(1,N).
!>

R

!>          R is DOUBLE PRECISION array, dimension (LDR,N)
!>          First part of the solution of the Sylvester Equation.
!>

LDR

!>          LDR is INTEGER
!>          The leading dimension of the array R.  LDR >= max(1,M).
!>

L

!>          L is DOUBLE PRECISION array, dimension (LDL,N)
!>          Second part of the solution of the Sylvester Equation.
!>

LDL

!>          LDL is INTEGER
!>          The leading dimension of the array L.  LDL >= max(1,M).
!>

E

!>          E is DOUBLE PRECISION array, dimension (LDE,N)
!>          The first right hand side of the Sylvester Equation.
!>

LDE

!>          LDE is INTEGER
!>          The leading dimension of the array E.  LDE >= max(1,M).
!>

F

!>          F is DOUBLE PRECISION array, dimension (LDF,N)
!>          The second right hand side of the Sylvester Equation.
!>

LDF

!>          LDF is INTEGER
!>          The leading dimension of the array F.  LDF >= max(1,M).
!>

SCALE

!>          SCALE is DOUBLE PRECISION
!>          SCALE is a scaling factor to prevent the overflow in the result.
!>

Returns

!>          The function returns the relative residual as defined in (1). If an error
!>          occurs a negative integer I is returned, signalizing that the parameter -I
!>          has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
!> .fi
Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 204 of file res_csylv_dual.f90.

double precision function dla_residual_glyap (character trans, integer m, double precision, dimension(lda, *) a, integer lda, double precision, dimension(ldb, *) b, integer ldb, double precision, dimension(ldx, *) x, integer ldx, double precision, dimension(ldy, *) y, integer ldy, double precision scale)

Compute the relative residual for the generalized Lyapunov equation.

Purpose:

!>
!> Compute the relative residual of the Lyapunov equation
!>
!>     RelRes = || SCALE*Y - op(A)*X*op(B)**T - op(B) * X * op(A)**T || / ( 2*||A||*||B||*||X|| + SCALE * ||Y|| )     (1)
!>
!> The norms are evaluated in terms of the Frobenius norm.
!>
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANS

!>          TRANS is CHARACTER(1)
!>          Specifies the form of the system of equations with respect to A :
!>          == 'N':  op(A) = A (No transpose for A)
!>          == 'T':  op(A) = A**T (Transpose A)
!>

M

!>          M is INTEGER
!>          The order of the matrix A.  M >= 0.
!>

A

!>          A is DOUBLE PRECISION array, dimension (LDA,M)
!>          The coefficient matrix A.
!>

LDA

!>          LDA is INTEGER
!>          The leading dimension of the array A.  LDA >= max(1,M).
!>

B

!>          B is DOUBLE PRECISION array, dimension (LDB,M)
!>          The coefficient matrix B.
!>

LDB

!>          LDB is INTEGER
!>          The leading dimension of the array B.  LDB >= max(1,M).
!>

X

!>          X is DOUBLE PRECISION array, dimension (LDX,M)
!>          Solution of the Lyapunov Equation.
!>

LDX

!>          LDX is INTEGER
!>          The leading dimension of the array X.  LDX >= max(1,M).
!>

Y

!>          Y is DOUBLE PRECISION array, dimension (LDY,M)
!>          The right hand side of the Lyapunov Equation.
!>

LDY

!>          LDY is INTEGER
!>          The leading dimension of the array Y.  LDY >= max(1,M).
!>

SCALE

!>          SCALE is DOUBLE PRECISION
!>          SCALE is a scaling factor to prevent the overflow in the result.
!>

Returns

!>          The function returns the relative residual as defined in (1). If an error
!>          occurs a negative integer I is returned, signalizing that the parameter -I
!>          has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
!> .fi
Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 129 of file res_glyap.f90.

double precision function dla_residual_gstein (character trans, integer m, double precision, dimension(lda, *) a, integer lda, double precision, dimension(ldb, *) b, integer ldb, double precision, dimension(ldx, *) x, integer ldx, double precision, dimension(ldy, *) y, integer ldy, double precision scale)

Compute the relative residual for the generalized Stein equation.

Purpose:

!>
!> Compute the relative residual of the Stein equation
!>
!>     RelRes = || SCALE*Y - op(A)*X*op(A)**T + op(B) * X * op(B)**T || / ( (||A||**2+||B||**2)*||X|| + SCALE * ||Y|| )     (1)
!>
!> The norms are evaluated in terms of the Frobenius norm.
!>
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANS

!>          TRANS is CHARACTER(1)
!>          Specifies the form of the system of equations with respect to A :
!>          == 'N':  op(A) = A (No transpose for A)
!>          == 'T':  op(A) = A**T (Transpose A)
!>

M

!>          M is INTEGER
!>          The order of the matrix A.  M >= 0.
!>

A

!>          A is DOUBLE PRECISION array, dimension (LDA,M)
!>          The coefficient matrix A.
!>

LDA

!>          LDA is INTEGER
!>          The leading dimension of the array A.  LDA >= max(1,M).
!>

B

!>          B is DOUBLE PRECISION array, dimension (LDB,M)
!>          The coefficient matrix B.
!>

LDB

!>          LDB is INTEGER
!>          The leading dimension of the array B.  LDB >= max(1,M).
!>

X

!>          X is DOUBLE PRECISION array, dimension (LDX,M)
!>          Solution of the Stein Equation.
!>

LDX

!>          LDX is INTEGER
!>          The leading dimension of the array X.  LDX >= max(1,M).
!>

Y

!>          Y is DOUBLE PRECISION array, dimension (LDY,M)
!>          The right hand side of the Stein Equation.
!>

LDY

!>          LDY is INTEGER
!>          The leading dimension of the array Y.  LDY >= max(1,M).
!>

SCALE

!>          SCALE is DOUBLE PRECISION
!>          SCALE is a scaling factor to prevent the overflow in the result.
!>

Returns

!>          The function returns the relative residual as defined in (1). If an error
!>          occurs a negative integer I is returned, signalizing that the parameter -I
!>          has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
!> .fi
Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 129 of file res_gstein.f90.

double precision function dla_residual_gsylv (character transa, character 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(ldx, *) x, integer ldx, double precision, dimension(ldy, *) y, integer ldy, double precision scale)

Compute the relative residual for the generalized Sylvester equation.

Purpose:

!>
!> Compute the relative residual of the generalized Sylvester equation
!>
!>  RelRes = || SCALE*Y - opA(A)*X*opB(B) - SGN * opA(C) * X opB(D) ) || / ( (||A||*||B||+||C||*||D||)*||X|| + SCALE * ||Y|| )  (1)
!>
!> The norms are evaluated in terms of the Frobenius norm.
!>
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANSA

!>          TRANSA is CHARACTER(1)
!>          Specifies the form of the system of equations with respect to A :
!>          == 'N':  opA(A) = A (No transpose for A)
!>          == 'T':  opA(A) = A**T (Transpose A)
!>

TRANSB

!>          TRANSB is CHARACTER(1)
!>          Specifies the form of the system of equations with respect to B :
!>          == 'N':  opB(B) = B (No transpose for B)
!>          == 'T':  opB(B) = B**T (Transpose B)
!>

SGN

!>          SGN is DOUBLE PRECISION, allowed values: +/-1
!>          Specifies the sign between the two parts of the Sylvester equation.
!>

M

!>          M is INTEGER
!>          The order of the matrix A.  M >= 0.
!>

N

!>          N is INTEGER
!>          The order of the matrix B.  N >= 0.
!>

A

!>          A is DOUBLE PRECISION array, dimension (LDA,M)
!>          The coefficient matrix A.
!>

LDA

!>          LDA is INTEGER
!>          The leading dimension of the array A.  LDA >= max(1,M).
!>

B

!>          B is DOUBLE PRECISION array, dimension (LDB,N)
!>          The coefficient matrix B.
!>

LDB

!>          LDB is INTEGER
!>          The leading dimension of the array A.  LDB >= max(1,N).
!>

C

!>          C is DOUBLE PRECISION array, dimension (LDC,M)
!>          The coefficient matrix 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)
!>          The coefficient matrix D.
!>

LDD

!>          LDD is INTEGER
!>          The leading dimension of the array A.  LDD >= max(1,N).
!>

X

!>          X is DOUBLE PRECISION array, dimension (LDX,N)
!>          Solution of the Sylvester Equation.
!>

LDX

!>          LDX is INTEGER
!>          The leading dimension of the array X.  LDX >= max(1,M).
!>

Y

!>          Y is DOUBLE PRECISION array, dimension (LDY,N)
!>          The right hand side of the Sylvester Equation.
!>

LDY

!>          LDY is INTEGER
!>          The leading dimension of the array Y.  LDY >= max(1,M).
!>

SCALE

!>          SCALE is DOUBLE PRECISION
!>          SCALE is a scaling factor to prevent the overflow in the result.
!>

Returns

!>          The function returns the relative residual as defined in (1). If an error
!>          occurs a negative integer I is returned, signalizing that the parameter -I
!>          has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
!> .fi
Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 172 of file res_gsylv.f90.

double precision function dla_residual_lyap (character trans, integer m, double precision, dimension(lda, *) a, integer lda, double precision, dimension(ldx, *) x, integer ldx, double precision, dimension(ldy, *) y, integer ldy, double precision scale)

Compute the relative residual for the Lyapunov equation.

Purpose:

!>
!> Compute the relative residual of the Lyapunov equation
!>
!>     RelRes = || SCALE*Y - op(A)*X - X * op(A)**T || / ( 2*||A||*||X|| + SCALE * ||Y|| )     (1)
!>
!> The norms are evaluated in terms of the Frobenius norm.
!>
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANS

!>          TRANS is CHARACTER(1)
!>          Specifies the form of the system of equations with respect to A :
!>          == 'N':  op(A) = A (No transpose for A)
!>          == 'T':  op(A) = A**T (Transpose A)
!>

M

!>          M is INTEGER
!>          The order of the matrix A.  M >= 0.
!>

A

!>          A is DOUBLE PRECISION array, dimension (LDA,M)
!>          The coefficient matrix A.
!>

LDA

!>          LDA is INTEGER
!>          The leading dimension of the array A.  LDA >= max(1,M).
!>

X

!>          X is DOUBLE PRECISION array, dimension (LDX,M)
!>          Solution of the Lyapunov Equation.
!>

LDX

!>          LDX is INTEGER
!>          The leading dimension of the array X.  LDX >= max(1,M).
!>

Y

!>          Y is DOUBLE PRECISION array, dimension (LDY,M)
!>          The right hand side of the Lyapunov Equation.
!>

LDY

!>          LDY is INTEGER
!>          The leading dimension of the array Y.  LDY >= max(1,M).
!>

SCALE

!>          SCALE is DOUBLE PRECISION
!>          SCALE is a scaling factor to prevent the overflow in the result.
!>

Returns

!>          The function returns the relative residual as defined in (1). If an error
!>          occurs a negative integer I is returned, signalizing that the parameter -I
!>          has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
!> .fi
Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 116 of file res_lyap.f90.

double precision function dla_residual_stein (character trans, integer m, double precision, dimension(lda, *) a, integer lda, double precision, dimension(ldx, *) x, integer ldx, double precision, dimension(ldy, *) y, integer ldy, double precision scale)

Compute the relative residual for the Stein equation.

Purpose:

!>
!> Compute the relative residual of the Stein equation
!>
!>     RelRes = || SCALE*Y - op(A)*X*op(A)**T + X || / ( (||A||**2 + 1 )*||X|| + SCALE * ||Y|| )     (1)
!>
!> The norms are evaluated in terms of the Frobenius norm.
!>
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANS

!>          TRANS is CHARACTER(1)
!>          Specifies the form of the system of equations with respect to A :
!>          == 'N':  op(A) = A (No transpose for A)
!>          == 'T':  op(A) = A**T (Transpose A)
!>

M

!>          M is INTEGER
!>          The order of the matrix A.  M >= 0.
!>

A

!>          A is DOUBLE PRECISION array, dimension (LDA,M)
!>          The coefficient matrix A.
!>

LDA

!>          LDA is INTEGER
!>          The leading dimension of the array A.  LDA >= max(1,M).
!>

X

!>          X is DOUBLE PRECISION array, dimension (LDX,M)
!>          Solution of the Stein Equation.
!>

LDX

!>          LDX is INTEGER
!>          The leading dimension of the array X.  LDX >= max(1,M).
!>

Y

!>          Y is DOUBLE PRECISION array, dimension (LDY,M)
!>          The right hand side of the Stein Equation.
!>

LDY

!>          LDY is INTEGER
!>          The leading dimension of the array Y.  LDY >= max(1,M).
!>

SCALE

!>          SCALE is DOUBLE PRECISION
!>          SCALE is a scaling factor to prevent the overflow in the result.
!>

Returns

!>          The function returns the relative residual as defined in (1). If an error
!>          occurs a negative integer I is returned, signalizing that the parameter -I
!>          has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
!> .fi
Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 116 of file res_stein.f90.

double precision function dla_residual_sylv (character transa, character 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(ldx, *) x, integer ldx, double precision, dimension(ldy, *) y, integer ldy, double precision scale)

Compute the relative residual for the Sylvester equation.

Purpose:

!>
!> Compute the relative residual of the Sylvester equation
!>
!>     RelRes = || SCALE*Y - opA(A)*X - SGN * X * opB(B) || / ( (||A||+||B||)*||X|| + SCALE * ||Y|| )     (1)
!>
!> The norms are evaluated in terms of the Frobenius norm.
!>
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANSA

!>          TRANSA is CHARACTER(1)
!>          Specifies the form of the system of equations with respect to A :
!>          == 'N':  opA(A) = A (No transpose for A)
!>          == 'T':  opA(A) = A**T (Transpose A)
!>

TRANSB

!>          TRANSB is CHARACTER(1)
!>          Specifies the form of the system of equations with respect to B :
!>          == 'N':  opB(B) = B (No transpose for B)
!>          == 'T':  opB(B) = B**T (Transpose B)
!>

SGN

!>          SGN is DOUBLE PRECISION, allowed values: +/-1
!>          Specifies the sign between the two parts of the Sylvester equation.
!>

M

!>          M is INTEGER
!>          The order of the matrix A.  M >= 0.
!>

N

!>          N is INTEGER
!>          The order of the matrix B.  N >= 0.
!>

A

!>          A is DOUBLE PRECISION array, dimension (LDA,M)
!>          The coefficient matrix A.
!>

LDA

!>          LDA is INTEGER
!>          The leading dimension of the array A.  LDA >= max(1,M).
!>

B

!>          B is DOUBLE PRECISION array, dimension (LDB,N)
!>          The coefficient matrix B.
!>

LDB

!>          LDB is INTEGER
!>          The leading dimension of the array A.  LDB >= max(1,N).
!>

X

!>          X is DOUBLE PRECISION array, dimension (LDX,N)
!>          Solution of the Sylvester Equation.
!>

LDX

!>          LDX is INTEGER
!>          The leading dimension of the array X.  LDX >= max(1,M).
!>

Y

!>          Y is DOUBLE PRECISION array, dimension (LDY,N)
!>          The right hand side of the Sylvester Equation.
!>

LDY

!>          LDY is INTEGER
!>          The leading dimension of the array Y.  LDY >= max(1,M).
!>

SCALE

!>          SCALE is DOUBLE PRECISION
!>          SCALE is a scaling factor to prevent the overflow in the result.
!>

Returns

!>          The function returns the relative residual as defined in (1). If an error
!>          occurs a negative integer I is returned, signalizing that the parameter -I
!>          has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
!> .fi
Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 148 of file res_sylv.f90.

double precision function dla_residual_sylv2 (character transa, character 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(ldx, *) x, integer ldx, double precision, dimension(ldy, *) y, integer ldy, double precision scale)

Compute the relative residual for the discrete-time Sylvester equation.

Purpose:

!>
!> Compute the relative residual of the discrete-time Sylvester equation
!>
!>     RelRes = || SCALE*Y - opA(A)*X*opB(B) - SGN * X ) || / ( (||A||*||B||+1)*||X|| + SCALE * ||Y|| )     (1)
!>
!> The norms are evaluated in terms of the Frobenius norm.
!>
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANSA

!>          TRANSA is CHARACTER(1)
!>          Specifies the form of the system of equations with respect to A :
!>          == 'N':  opA(A) = A (No transpose for A)
!>          == 'T':  opA(A) = A**T (Transpose A)
!>

TRANSB

!>          TRANSB is CHARACTER(1)
!>          Specifies the form of the system of equations with respect to B :
!>          == 'N':  opB(B) = B (No transpose for B)
!>          == 'T':  opB(B) = B**T (Transpose B)
!>

SGN

!>          SGN is DOUBLE PRECISION, allowed values: +/-1
!>          Specifies the sign between the two parts of the Sylvester equation.
!>

M

!>          M is INTEGER
!>          The order of the matrix A.  M >= 0.
!>

N

!>          N is INTEGER
!>          The order of the matrix B.  N >= 0.
!>

A

!>          A is DOUBLE PRECISION array, dimension (LDA,M)
!>          The coefficient matrix A.
!>

LDA

!>          LDA is INTEGER
!>          The leading dimension of the array A.  LDA >= max(1,M).
!>

B

!>          B is DOUBLE PRECISION array, dimension (LDB,N)
!>          The coefficient matrix B.
!>

LDB

!>          LDB is INTEGER
!>          The leading dimension of the array A.  LDB >= max(1,N).
!>

X

!>          X is DOUBLE PRECISION array, dimension (LDX,N)
!>          Solution of the Sylvester Equation.
!>

LDX

!>          LDX is INTEGER
!>          The leading dimension of the array X.  LDX >= max(1,M).
!>

Y

!>          Y is DOUBLE PRECISION array, dimension (LDY,N)
!>          The right hand side of the Sylvester Equation.
!>

LDY

!>          LDY is INTEGER
!>          The leading dimension of the array Y.  LDY >= max(1,M).
!>

SCALE

!>          SCALE is DOUBLE PRECISION
!>          SCALE is a scaling factor to prevent the overflow in the result.
!>

Returns

!>          The function returns the relative residual as defined in (1). If an error
!>          occurs a negative integer I is returned, signalizing that the parameter -I
!>          has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
!> .fi
Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 148 of file res_sylv2.f90.

real function sla_residual_csylv (character transa, character transb, real sgn1, real sgn2, integer m, integer n, real, dimension(lda, *) a, integer lda, real, dimension(ldb, *) b, integer ldb, real, dimension(ldc,*) c, integer ldc, real, dimension(ldd, *) d, integer ldd, real, dimension(ldr, *) r, integer ldr, real, dimension(ldl, *) l, integer ldl, real, dimension(lde, *) e, integer lde, real, dimension(ldf, *) f, integer ldf, real scale)

Compute the relative residual for the coupled Sylvester equation.

Purpose:

!>
!> Compute the relative residual of the coupled Sylvester equation
!>
!>  RelRes = max( || SCALE*E - opA(A)*R - SGN1 * L *opB(B) || / ( (||A||*||R||+||B||*||L||) + SCALE * ||E|| ),
!>                || SCALE*F - opA(C)*R - SGN2 * L *opB(D) || / ( (||C||*||R||+||D||*||L||) + SCALE * ||F|| ))    (1)
!>
!> The norms are evaluated in terms of the Frobenius norm.
!>
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANSA

!>          TRANSA is CHARACTER(1)
!>          Specifies the form of the system of equations with respect to A :
!>          == 'N':  opA(A) = A (No transpose for A)
!>          == 'T':  opA(A) = A**T (Transpose A)
!>

TRANSB

!>          TRANSB is CHARACTER(1)
!>          Specifies the form of the system of equations with respect to B :
!>          == 'N':  opB(B) = B (No transpose for B)
!>          == 'T':  opB(B) = B**T (Transpose B)
!>

SGN1

!>          SGN1 is REAL, allowed values: +/-1
!>          Specifies the sign between the two parts of the first equation.
!>

SGN2

!>          SGN2 is REAL, allowed values: +/-1
!>          Specifies the sign between the two parts of the second equation.
!>

M

!>          M is INTEGER
!>          The order of the matrix A.  M >= 0.
!>

N

!>          N is INTEGER
!>          The order of the matrix B.  N >= 0.
!>

A

!>          A is REAL array, dimension (LDA,M)
!>          The coefficient matrix A.
!>

LDA

!>          LDA is INTEGER
!>          The leading dimension of the array A.  LDA >= max(1,M).
!>

B

!>          B is REAL array, dimension (LDB,N)
!>          The coefficient matrix B.
!>

LDB

!>          LDB is INTEGER
!>          The leading dimension of the array A.  LDB >= max(1,N).
!>

C

!>          C is REAL array, dimension (LDC,M)
!>          The coefficient matrix C.
!>

LDC

!>          LDC is INTEGER
!>          The leading dimension of the array C.  LDC >= max(1,M).
!>

D

!>          D is REAL array, dimension (LDD,N)
!>          The coefficient matrix D.
!>

LDD

!>          LDD is INTEGER
!>          The leading dimension of the array A.  LDD >= max(1,N).
!>

R

!>          R is REAL array, dimension (LDR,N)
!>          First part of the solution of the Sylvester Equation.
!>

LDR

!>          LDR is INTEGER
!>          The leading dimension of the array R.  LDR >= max(1,M).
!>

L

!>          L is REAL array, dimension (LDL,N)
!>          Second part of the solution of the Sylvester Equation.
!>

LDL

!>          LDL is INTEGER
!>          The leading dimension of the array L.  LDL >= max(1,M).
!>

E

!>          E is REAL array, dimension (LDE,N)
!>          The first right hand side of the Sylvester Equation.
!>

LDE

!>          LDE is INTEGER
!>          The leading dimension of the array E.  LDE >= max(1,M).
!>

F

!>          F is REAL array, dimension (LDF,N)
!>          The second right hand side of the Sylvester Equation.
!>

LDF

!>          LDF is INTEGER
!>          The leading dimension of the array F.  LDF >= max(1,M).
!>

SCALE

!>          SCALE is REAL
!>          SCALE is a scaling factor to prevent the overflow in the result.
!>

Returns

!>          The function returns the relative residual as defined in (1). If an error
!>          occurs a negative integer I is returned, signalizing that the parameter -I
!>          has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
!> .fi
Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 204 of file res_csylv.f90.

real function sla_residual_csylv_dual (character transa, character transb, real sgn1, real sgn2, integer m, integer n, real, dimension(lda, *) a, integer lda, real, dimension(ldb, *) b, integer ldb, real, dimension(ldc,*) c, integer ldc, real, dimension(ldd, *) d, integer ldd, real, dimension(ldr, *) r, integer ldr, real, dimension(ldl, *) l, integer ldl, real, dimension(lde, *) e, integer lde, real, dimension(ldf, *) f, integer ldf, real scale)

Compute the relative residual for the dual coupled Sylvester equation.

Purpose:

!>
!> Compute the relative residual of the dual coupled Sylvester equation
!>
!>  RelRes = max( || SCALE*E - opA(A)**T *R - opA(C) ** T *L || / ( (||A||*||R||+||C||*||L||) + SCALE * ||E|| ),
!>                || SCALE*F - SGN1 * R  * opB(B)**T - SGN2 * L * opB(D) **T || / ( (||B||*||R||+||D||*||L||) + SCALE * ||F||)) (1)
!>
!> The norms are evaluated in terms of the Frobenius norm.
!>
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANSA

!>          TRANSA is CHARACTER(1)
!>          Specifies the form of the system of equations with respect to A :
!>          == 'N':  opA(A) = A (No transpose for A)
!>          == 'T':  opA(A) = A**T (Transpose A)
!>

TRANSB

!>          TRANSB is CHARACTER(1)
!>          Specifies the form of the system of equations with respect to B :
!>          == 'N':  opB(B) = B (No transpose for B)
!>          == 'T':  opB(B) = B**T (Transpose B)
!>

SGN1

!>          SGN1 is REAL, allowed values: +/-1
!>          Specifies the sign between the two parts of the first equation.
!>

SGN2

!>          SGN2 is REAL, allowed values: +/-1
!>          Specifies the sign between the two parts of the second equation.
!>

M

!>          M is INTEGER
!>          The order of the matrix A.  M >= 0.
!>

N

!>          N is INTEGER
!>          The order of the matrix B.  N >= 0.
!>

A

!>          A is REAL array, dimension (LDA,M)
!>          The coefficient matrix A.
!>

LDA

!>          LDA is INTEGER
!>          The leading dimension of the array A.  LDA >= max(1,M).
!>

B

!>          B is REAL array, dimension (LDB,N)
!>          The coefficient matrix B.
!>

LDB

!>          LDB is INTEGER
!>          The leading dimension of the array A.  LDB >= max(1,N).
!>

C

!>          C is REAL array, dimension (LDC,M)
!>          The coefficient matrix C.
!>

LDC

!>          LDC is INTEGER
!>          The leading dimension of the array C.  LDC >= max(1,M).
!>

D

!>          D is REAL array, dimension (LDD,N)
!>          The coefficient matrix D.
!>

LDD

!>          LDD is INTEGER
!>          The leading dimension of the array A.  LDD >= max(1,N).
!>

R

!>          R is REAL array, dimension (LDR,N)
!>          First part of the solution of the Sylvester Equation.
!>

LDR

!>          LDR is INTEGER
!>          The leading dimension of the array R.  LDR >= max(1,M).
!>

L

!>          L is REAL array, dimension (LDL,N)
!>          Second part of the solution of the Sylvester Equation.
!>

LDL

!>          LDL is INTEGER
!>          The leading dimension of the array L.  LDL >= max(1,M).
!>

E

!>          E is REAL array, dimension (LDE,N)
!>          The first right hand side of the Sylvester Equation.
!>

LDE

!>          LDE is INTEGER
!>          The leading dimension of the array E.  LDE >= max(1,M).
!>

F

!>          F is REAL array, dimension (LDF,N)
!>          The second right hand side of the Sylvester Equation.
!>

LDF

!>          LDF is INTEGER
!>          The leading dimension of the array F.  LDF >= max(1,M).
!>

SCALE

!>          SCALE is REAL
!>          SCALE is a scaling factor to prevent the overflow in the result.
!>

Returns

!>          The function returns the relative residual as defined in (1). If an error
!>          occurs a negative integer I is returned, signalizing that the parameter -I
!>          has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
!> .fi
Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 204 of file res_csylv_dual.f90.

real function sla_residual_glyap (character trans, 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 scale)

Compute the relative residual for the generalized Lyapunov equation.

Purpose:

!>
!> Compute the relative residual of the Lyapunov equation
!>
!>     RelRes = || SCALE*Y - op(A)*X*op(B)**T - op(B) * X * op(A)**T || / ( 2*||A||*||B||*||X|| + SCALE * ||Y|| )     (1)
!>
!> The norms are evaluated in terms of the Frobenius norm.
!>
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANS

!>          TRANS is CHARACTER(1)
!>          Specifies the form of the system of equations with respect to A :
!>          == 'N':  op(A) = A (No transpose for A)
!>          == 'T':  op(A) = A**T (Transpose A)
!>

M

!>          M is INTEGER
!>          The order of the matrix A.  M >= 0.
!>

A

!>          A is REAL array, dimension (LDA,M)
!>          The coefficient matrix A.
!>

LDA

!>          LDA is INTEGER
!>          The leading dimension of the array A.  LDA >= max(1,M).
!>

B

!>          B is REAL array, dimension (LDB,M)
!>          The coefficient matrix B.
!>

LDB

!>          LDB is INTEGER
!>          The leading dimension of the array B.  LDB >= max(1,M).
!>

X

!>          X is REAL array, dimension (LDX,M)
!>          Solution of the Lyapunov Equation.
!>

LDX

!>          LDX is INTEGER
!>          The leading dimension of the array X.  LDX >= max(1,M).
!>

Y

!>          Y is REAL array, dimension (LDY,M)
!>          The right hand side of the Lyapunov Equation.
!>

LDY

!>          LDY is INTEGER
!>          The leading dimension of the array Y.  LDY >= max(1,M).
!>

SCALE

!>          SCALE is REAL
!>          SCALE is a scaling factor to prevent the overflow in the result.
!>

Returns

!>          The function returns the relative residual as defined in (1). If an error
!>          occurs a negative integer I is returned, signalizing that the parameter -I
!>          has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
!> .fi
Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 129 of file res_glyap.f90.

real function sla_residual_gstein (character trans, 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 scale)

Compute the relative residual for the generalized Stein equation.

Purpose:

!>
!> Compute the relative residual of the Stein equation
!>
!>     RelRes = || SCALE*Y - op(A)*X*op(A)**T + op(B) * X * op(B)**T || / ( (||A||**2+||B||**2)*||X|| + SCALE * ||Y|| )     (1)
!>
!> The norms are evaluated in terms of the Frobenius norm.
!>
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANS

!>          TRANS is CHARACTER(1)
!>          Specifies the form of the system of equations with respect to A :
!>          == 'N':  op(A) = A (No transpose for A)
!>          == 'T':  op(A) = A**T (Transpose A)
!>

M

!>          M is INTEGER
!>          The order of the matrix A.  M >= 0.
!>

A

!>          A is REAL array, dimension (LDA,M)
!>          The coefficient matrix A.
!>

LDA

!>          LDA is INTEGER
!>          The leading dimension of the array A.  LDA >= max(1,M).
!>

B

!>          B is REAL array, dimension (LDB,M)
!>          The coefficient matrix B.
!>

LDB

!>          LDB is INTEGER
!>          The leading dimension of the array B.  LDB >= max(1,M).
!>

X

!>          X is REAL array, dimension (LDX,M)
!>          Solution of the Stein Equation.
!>

LDX

!>          LDX is INTEGER
!>          The leading dimension of the array X.  LDX >= max(1,M).
!>

Y

!>          Y is REAL array, dimension (LDY,M)
!>          The right hand side of the Stein Equation.
!>

LDY

!>          LDY is INTEGER
!>          The leading dimension of the array Y.  LDY >= max(1,M).
!>

SCALE

!>          SCALE is REAL
!>          SCALE is a scaling factor to prevent the overflow in the result.
!>

Returns

!>          The function returns the relative residual as defined in (1). If an error
!>          occurs a negative integer I is returned, signalizing that the parameter -I
!>          has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
!> .fi
Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 129 of file res_gstein.f90.

real function sla_residual_gsylv (character transa, character transb, real sgn, integer m, integer n, real, dimension(lda, *) a, integer lda, real, dimension(ldb, *) b, integer ldb, real, dimension(ldc,*) c, integer ldc, real, dimension(ldd, *) d, integer ldd, real, dimension(ldx, *) x, integer ldx, real, dimension(ldy, *) y, integer ldy, real scale)

Compute the relative residual for the generalized Sylvester equation.

Purpose:

!>
!> Compute the relative residual of the generalized Sylvester equation
!>
!>  RelRes = || SCALE*Y - opA(A)*X*opB(B) - SGN * opA(C) * X opB(D) ) || / ( (||A||*||B||+||C||*||D||)*||X|| + SCALE * ||Y|| )  (1)
!>
!> The norms are evaluated in terms of the Frobenius norm.
!>
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANSA

!>          TRANSA is CHARACTER(1)
!>          Specifies the form of the system of equations with respect to A :
!>          == 'N':  opA(A) = A (No transpose for A)
!>          == 'T':  opA(A) = A**T (Transpose A)
!>

TRANSB

!>          TRANSB is CHARACTER(1)
!>          Specifies the form of the system of equations with respect to B :
!>          == 'N':  opB(B) = B (No transpose for B)
!>          == 'T':  opB(B) = B**T (Transpose B)
!>

SGN

!>          SGN is REAL, allowed values: +/-1
!>          Specifies the sign between the two parts of the Sylvester equation.
!>

M

!>          M is INTEGER
!>          The order of the matrix A.  M >= 0.
!>

N

!>          N is INTEGER
!>          The order of the matrix B.  N >= 0.
!>

A

!>          A is REAL array, dimension (LDA,M)
!>          The coefficient matrix A.
!>

LDA

!>          LDA is INTEGER
!>          The leading dimension of the array A.  LDA >= max(1,M).
!>

B

!>          B is REAL array, dimension (LDB,N)
!>          The coefficient matrix B.
!>

LDB

!>          LDB is INTEGER
!>          The leading dimension of the array A.  LDB >= max(1,N).
!>

C

!>          C is REAL array, dimension (LDC,M)
!>          The coefficient matrix C.
!>

LDC

!>          LDC is INTEGER
!>          The leading dimension of the array C.  LDC >= max(1,M).
!>

D

!>          D is REAL array, dimension (LDD,N)
!>          The coefficient matrix D.
!>

LDD

!>          LDD is INTEGER
!>          The leading dimension of the array A.  LDD >= max(1,N).
!>

X

!>          X is REAL array, dimension (LDX,N)
!>          Solution of the Sylvester Equation.
!>

LDX

!>          LDX is INTEGER
!>          The leading dimension of the array X.  LDX >= max(1,M).
!>

Y

!>          Y is REAL array, dimension (LDY,N)
!>          The right hand side of the Sylvester Equation.
!>

LDY

!>          LDY is INTEGER
!>          The leading dimension of the array Y.  LDY >= max(1,M).
!>

SCALE

!>          SCALE is REAL
!>          SCALE is a scaling factor to prevent the overflow in the result.
!>

Returns

!>          The function returns the relative residual as defined in (1). If an error
!>          occurs a negative integer I is returned, signalizing that the parameter -I
!>          has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
!> .fi
Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 172 of file res_gsylv.f90.

real function sla_residual_lyap (character trans, integer m, real, dimension(lda, *) a, integer lda, real, dimension(ldx, *) x, integer ldx, real, dimension(ldy, *) y, integer ldy, real scale)

Compute the relative residual for the Lyapunov equation.

Purpose:

!>
!> Compute the relative residual of the Lyapunov equation
!>
!>     RelRes = || SCALE*Y - op(A)*X - X * op(A)**T || / ( 2*||A||*||X|| + SCALE * ||Y|| )     (1)
!>
!> The norms are evaluated in terms of the Frobenius norm.
!>
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANS

!>          TRANS is CHARACTER(1)
!>          Specifies the form of the system of equations with respect to A :
!>          == 'N':  op(A) = A (No transpose for A)
!>          == 'T':  op(A) = A**T (Transpose A)
!>

M

!>          M is INTEGER
!>          The order of the matrix A.  M >= 0.
!>

A

!>          A is REAL array, dimension (LDA,M)
!>          The coefficient matrix A.
!>

LDA

!>          LDA is INTEGER
!>          The leading dimension of the array A.  LDA >= max(1,M).
!>

X

!>          X is REAL array, dimension (LDX,M)
!>          Solution of the Lyapunov Equation.
!>

LDX

!>          LDX is INTEGER
!>          The leading dimension of the array X.  LDX >= max(1,M).
!>

Y

!>          Y is REAL array, dimension (LDY,M)
!>          The right hand side of the Lyapunov Equation.
!>

LDY

!>          LDY is INTEGER
!>          The leading dimension of the array Y.  LDY >= max(1,M).
!>

SCALE

!>          SCALE is REAL
!>          SCALE is a scaling factor to prevent the overflow in the result.
!>

Returns

!>          The function returns the relative residual as defined in (1). If an error
!>          occurs a negative integer I is returned, signalizing that the parameter -I
!>          has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
!> .fi
Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 116 of file res_lyap.f90.

real function sla_residual_stein (character trans, integer m, real, dimension(lda, *) a, integer lda, real, dimension(ldx, *) x, integer ldx, real, dimension(ldy, *) y, integer ldy, real scale)

Compute the relative residual for the Stein equation.

Purpose:

!>
!> Compute the relative residual of the Stein equation
!>
!>     RelRes = || SCALE*Y - op(A)*X*op(A)**T + X || / ( (||A||**2 + 1 )*||X|| + SCALE * ||Y|| )     (1)
!>
!> The norms are evaluated in terms of the Frobenius norm.
!>
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANS

!>          TRANS is CHARACTER(1)
!>          Specifies the form of the system of equations with respect to A :
!>          == 'N':  op(A) = A (No transpose for A)
!>          == 'T':  op(A) = A**T (Transpose A)
!>

M

!>          M is INTEGER
!>          The order of the matrix A.  M >= 0.
!>

A

!>          A is REAL array, dimension (LDA,M)
!>          The coefficient matrix A.
!>

LDA

!>          LDA is INTEGER
!>          The leading dimension of the array A.  LDA >= max(1,M).
!>

X

!>          X is REAL array, dimension (LDX,M)
!>          Solution of the Stein Equation.
!>

LDX

!>          LDX is INTEGER
!>          The leading dimension of the array X.  LDX >= max(1,M).
!>

Y

!>          Y is REAL array, dimension (LDY,M)
!>          The right hand side of the Stein Equation.
!>

LDY

!>          LDY is INTEGER
!>          The leading dimension of the array Y.  LDY >= max(1,M).
!>

SCALE

!>          SCALE is REAL
!>          SCALE is a scaling factor to prevent the overflow in the result.
!>

Returns

!>          The function returns the relative residual as defined in (1). If an error
!>          occurs a negative integer I is returned, signalizing that the parameter -I
!>          has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
!> .fi
Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 116 of file res_stein.f90.

real function sla_residual_sylv (character transa, character transb, real sgn, integer m, integer n, 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 scale)

Compute the relative residual for the Sylvester equation.

Purpose:

!>
!> Compute the relative residual of the Sylvester equation
!>
!>     RelRes = || SCALE*Y - opA(A)*X - SGN * X * opB(B) || / ( (||A||+||B||)*||X|| + SCALE * ||Y|| )     (1)
!>
!> The norms are evaluated in terms of the Frobenius norm.
!>
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANSA

!>          TRANSA is CHARACTER(1)
!>          Specifies the form of the system of equations with respect to A :
!>          == 'N':  opA(A) = A (No transpose for A)
!>          == 'T':  opA(A) = A**T (Transpose A)
!>

TRANSB

!>          TRANSB is CHARACTER(1)
!>          Specifies the form of the system of equations with respect to B :
!>          == 'N':  opB(B) = B (No transpose for B)
!>          == 'T':  opB(B) = B**T (Transpose B)
!>

SGN

!>          SGN is REAL, allowed values: +/-1
!>          Specifies the sign between the two parts of the Sylvester equation.
!>

M

!>          M is INTEGER
!>          The order of the matrix A.  M >= 0.
!>

N

!>          N is INTEGER
!>          The order of the matrix B.  N >= 0.
!>

A

!>          A is REAL array, dimension (LDA,M)
!>          The coefficient matrix A.
!>

LDA

!>          LDA is INTEGER
!>          The leading dimension of the array A.  LDA >= max(1,M).
!>

B

!>          B is REAL array, dimension (LDB,N)
!>          The coefficient matrix B.
!>

LDB

!>          LDB is INTEGER
!>          The leading dimension of the array A.  LDB >= max(1,N).
!>

X

!>          X is REAL array, dimension (LDX,N)
!>          Solution of the Sylvester Equation.
!>

LDX

!>          LDX is INTEGER
!>          The leading dimension of the array X.  LDX >= max(1,M).
!>

Y

!>          Y is REAL array, dimension (LDY,N)
!>          The right hand side of the Sylvester Equation.
!>

LDY

!>          LDY is INTEGER
!>          The leading dimension of the array Y.  LDY >= max(1,M).
!>

SCALE

!>          SCALE is REAL
!>          SCALE is a scaling factor to prevent the overflow in the result.
!>

Returns

!>          The function returns the relative residual as defined in (1). If an error
!>          occurs a negative integer I is returned, signalizing that the parameter -I
!>          has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
!> .fi
Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 148 of file res_sylv.f90.

real function sla_residual_sylv2 (character transa, character transb, real sgn, integer m, integer n, 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 scale)

Compute the relative residual for the discrete-time Sylvester equation.

Purpose:

!>
!> Compute the relative residual of the discrete-time Sylvester equation
!>
!>     RelRes = || SCALE*Y - opA(A)*X*opB(B) - SGN * X ) || / ( (||A||*||B||+1)*||X|| + SCALE * ||Y|| )     (1)
!>
!> The norms are evaluated in terms of the Frobenius norm.
!>
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANSA

!>          TRANSA is CHARACTER(1)
!>          Specifies the form of the system of equations with respect to A :
!>          == 'N':  opA(A) = A (No transpose for A)
!>          == 'T':  opA(A) = A**T (Transpose A)
!>

TRANSB

!>          TRANSB is CHARACTER(1)
!>          Specifies the form of the system of equations with respect to B :
!>          == 'N':  opB(B) = B (No transpose for B)
!>          == 'T':  opB(B) = B**T (Transpose B)
!>

SGN

!>          SGN is REAL, allowed values: +/-1
!>          Specifies the sign between the two parts of the Sylvester equation.
!>

M

!>          M is INTEGER
!>          The order of the matrix A.  M >= 0.
!>

N

!>          N is INTEGER
!>          The order of the matrix B.  N >= 0.
!>

A

!>          A is REAL array, dimension (LDA,M)
!>          The coefficient matrix A.
!>

LDA

!>          LDA is INTEGER
!>          The leading dimension of the array A.  LDA >= max(1,M).
!>

B

!>          B is REAL array, dimension (LDB,N)
!>          The coefficient matrix B.
!>

LDB

!>          LDB is INTEGER
!>          The leading dimension of the array A.  LDB >= max(1,N).
!>

X

!>          X is REAL array, dimension (LDX,N)
!>          Solution of the Sylvester Equation.
!>

LDX

!>          LDX is INTEGER
!>          The leading dimension of the array X.  LDX >= max(1,M).
!>

Y

!>          Y is REAL array, dimension (LDY,N)
!>          The right hand side of the Sylvester Equation.
!>

LDY

!>          LDY is INTEGER
!>          The leading dimension of the array Y.  LDY >= max(1,M).
!>

SCALE

!>          SCALE is REAL
!>          SCALE is a scaling factor to prevent the overflow in the result.
!>

Returns

!>          The function returns the relative residual as defined in (1). If an error
!>          occurs a negative integer I is returned, signalizing that the parameter -I
!>          has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
!> .fi
Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 148 of file res_sylv2.f90.

Author

Generated automatically by Doxygen for MEPACK from the source code.

Info

Fri Oct 25 2024 00:00:00 Version 1.1.1 MEPACK