Purpose
=======
LA_SYSV computes the solution to a linear system of equations
A*X = B, where A is a real or complex symmetric matrix and X and B are
rectangular matrices or vectors. A diagonal pivoting method is used to
factor A as
A = U*D*U^T if UPLO = 'U', or A = L*D*L^T if UPLO = 'L'
where U (or L) is a product of permutation and unit upper (or lower)
triangular matrices, and D is a symmetric block diagonal matrix with
1 by 1 and 2 by 2 diagonal blocks. The factored form of A is then used
to solve the above system.
LA_HESV computes the solution to a linear system of equations
A*X = B, where A is a complex Hermitian matrix and X and B are
rectangular matrices or vectors. A diagonal pivoting method is used to
factor A as
A = U*D*U^H if UPLO = 'U', or A = L*D*L^H if UPLO = 'L'
where U (or L) is a product of permutation and unit upper (or lower)
triangular matrices, and D is a complex Hermitian block diagonal
matrix with 1 by 1 and 2 by 2 diagonal blocks. The factored form of A
is then used to solve the above system.
=========
SUBROUTINE LA_SYSV / LA_HESV( A, B, UPLO=uplo, &
IPIV=ipiv, INFO=info )
(), INTENT(INOUT) :: A(:,:),
CHARACTER(LEN=1), INTENT(IN), OPTIONAL :: UPLO
INTEGER, INTENT(OUT), OPTIONAL :: IPIV(:)
INTEGER, INTENT(OUT), OPTIONAL :: INFO
where
::= REAL | COMPLEX
::= KIND(1.0) | KIND(1.0D0)
::= B(:,:) | B(:)
Arguments
=========
A (input/output) REAL or COMPLEX square array, shape (:,:).
On entry, the matrix A.
If UPLO = 'U', the upper triangular part of A contains the upper
triangular part of the matrix A, and the strictly lower
triangular part of A is not referenced.
If UPLO = 'L', the lower triangular part of A contains the lower
triangular part of the matrix A, and the strictly upper
triangular part of A is not referenced.
On exit, the block diagonal matrix D and the multipliers used to
obtain the factor U or L from the factorization of A.
B (input/output) REAL or COMPLEX array, shape (:,:) with
size(B,1) = size(A,1) or shape (:) with size(B) = size(A,1).
On entry, the matrix B.
On exit, the solution matrix X.
UPLO Optional (input) CHARACTER(LEN=1)
= 'U': Upper triangle of A is stored;
= 'L': Lower triangle of A is stored.
Default value: 'U'.
IPIV Optional (output) INTEGER array, shape (:) with size(IPIV) =
size(A,1).
Details of the row and column interchanges and the block
structure of D.
If IPIV(k) > 0, then rows and columns k and IPIV(k) were
interchanged, and D(k,k) is a 1 by 1 diagonal block.
If IPIV k < 0, then there are two cases:
1. If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
columns (k-1) and -IPIV(k) were interchanged and
D(k-1:k,k-1:k) is a 2 by 2 diagonal block.
2. If UPLO = 'L' and IPIV(k) = IPIV(k+1) < 0, then rows and
columns (k + 1) and -IPIV(k) were interchanged and
D(k:k+1,k:k+1) is a 2 by 2 diagonal block.
INFO Optional (output) INTEGER
= 0: successful exit.
< 0: if INFO = -i, the i-th argument had an illegal value.
> 0: if INFO = i, D(i,i) = 0. The factorization has been
completed, but the block diagonal matrix D is singular, so
the solution could not be computed.
If INFO is not present and an error occurs, then the program is
terminated with an error message.