!----------------------------------------------------------------- ! ! Purpose ! ======= ! ! LA_POSV computes the solution to a system of linear equations A * X = B, ! where A is either a symmetric positive definite or hermitian matrix ! and X and B are either retriangular matrices or vectors. ! ! The Cholesky decomposition is used to factor A as ! A = U**T* U, if UPLO = 'U', or ! A = L * L**T, if UPLO = 'L', ! where U is an upper triangular matrix and L is a lower triangular ! matrix. The factored form of A is then used to solve the system of ! equations A * X = B. ! ! Arguments ! ========= ! ! SUBROUTINE LA_POSV( A, B, UPLO, INFO ) ! (), INTENT(INOUT) :: A(:,:), ! CHARACTER(LEN=1), INTENT(IN), OPTIONAL :: UPLO ! INTEGER, INTENT(OUT), OPTIONAL :: INFO ! ::= REAL | COMPLEX ! ::= KIND(1.0) | KIND(1.0D0) ! ::= B(:,:) | B(:) ! ! ===================== ! ! A (input/output) either REAL or COMPLEX array, shape (:,:), where ! SIZE(A,1) == SIZE(A,2) is a rank of matrix A. ! 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 factor U or L from the Cholesky ! factorization A = U**T*U or A = L*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. ! ! 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, the leading minor of order i of A is not ! positive definite, so the factorization could not be ! completed, and the solution has not been computed. ! If INFO is not present and an error occurs, then the program is ! terminated with an error message. ! !------------------------------------- .