!----------------------------------------------------------------- ! ! Purpose ! ======= ! ! LA_SYSV / LA_HESV computes the solution to a system of linear ! equations ! A * X = B, ! where A is a symmetric, hermitial or complex matrix and X and B ! are either retriangular matrices or vectors. ! The 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 (lower) ! triangular matrices, and D is symmetric and block diagonal with ! 1-by-1 and 2-by-2 diagonal blocks. The factored form of A is then ! used to solve the system of equations A * X = B. ! ! Arguments ! ========= ! ! SUBROUTINE LA_SYSV / LA_HESV( A, B, UPLO, IPIV, INFO ) ! (), INTENT(INOUT) :: A(:,:), ! CHARACTER(LEN=1), INTENT(IN), OPTIONAL :: UPLO ! INTEGER, INTENT(OUT), OPTIONAL :: IPIV(:) ! INTEGER, INTENT(OUT), OPTIONAL :: INFO ! ::= REAL | COMPLEX ! ::= KIND(1.0) | KIND(1.0D0) ! ::= B(:,:) | B(:) ! ! ===================== ! ! A (input/output) either REAL or COMPLEX square array, ! shape (:,:), size(A,1) == size(A,2). ! On entry, the symmetric matrix A. If UPLO = 'U', the leading ! 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 leading 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, if INFO = 0, the block diagonal matrix D and the ! multipliers used to obtain the factor U or L from the ! factorization either A = U*D*U**T or A = L*D*L**T. ! ! B (input/output) either REAL or COMPLEX rectangular array, ! shape either (:,:) or (:), size(B,1) or size(B) == size(A,1). ! On entry, the right hand side vector(s) of matrix B for the ! system of equations AX = B. ! On exit, if there is no error, the matrix of solution ! vector(s) X. ! ! UPLO Optional, (input) CHARACTER*1 ! If UPLO is present then: ! = 'U': Upper triangle of A is stored; ! = 'L': Lower triangle of A is stored. ! otherwise UPLO = 'U' is assumed. ! ! IPIV Optional (output) INTEGER array, shape (:), ! size(IPIV) == size(A,1). If IPIV is present it indices that ! define the permutation matrix P; row i of the matrix was ! interchanged with row IPIV(i). ! ! INFO Optional (output) INTEGER. ! If INFO is present ! = 0: successful exit ! < 0: if INFO = -k, the k-th argument had an illegal value ! > 0: if INFO = k, U(k,k) is exactly zero. The factorization ! has been completed, but the factor U is exactly ! 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. !------------------------------------- .