!----------------------------------------------------------------- ! ! Purpose ! ======= ! ! LA_PTSV computes the solution to a system of linear equations ! A*X = B, where A is either a symmetric positive definite or ! hermitia tridiagonal matrix, and X and B are either retriangular ! matrices or vectors. ! A is factored as A = L*D*L**T, and the factored form of A is then ! used to solve the system of equations. ! ! Arguments ! ========= ! ! SUBROUTINE LA_PTSV( D, E, B, INFO ) ! REAL(), INTENT(INOUT) :: D(:) ! (), INTENT(INOUT) :: E(:), ! INTEGER, INTENT(OUT), OPTIONAL :: INFO ! ::= REAL | COMPLEX ! ::= KIND(1.0) | KIND(1.0D0) ! ::= B(:,:) | B(:) ! ! ===================== ! ! D (input/output) either REAL array, shape (:), where SIZE(D) ! indicates the matrix rank (n). ! On entry, the n diagonal elements of the tridiagonal matrix ! A. On exit, the n diagonal elements of the diagonal matrix ! D from the factorization A = L*D*L**T. ! ! E (input/output) either REAL or COMPLEX array, shape (:), where ! SIZE(E) == SIZE(D)-1. ! On entry, the (n-1) subdiagonal elements of the tridiagonal ! matrix A. On exit, the (n-1) subdiagonal elements of the ! unit bidiagonal factor L from the L*D*L**T factorization of ! A. (E can also be regarded as the superdiagonal of the unit ! bidiagonal factor U from the U**T*D*U factorization of A.) ! ! B (input/output) either REAL or COMPLEX rectangular array, ! shape either (:,:) or (:), size(B,1) or size(B) == size(D). ! 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. ! ! 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. ! !------------------------------------- .