Purpose
=======
LA_GTSV computes the solution to a real or complex linear system of
equations A*X = B, where A is a square tridiagonal matrix and X and B
are rectangular matrices or vectors. The LU decomposition is used to
factor the matrix A as A = L*U , where L is a product of permutation
and unit lower bidiagonal matrices and U is upper triangular with
nonzeros in only the main diagonal and first two superdiagonals.
The factored form of A is then used to solve the above system.
Note: The system A^T*X = B may be solved by interchanging the order of
the arguments DU and DL.
=========
SUBROUTINE LA_GTSV( DL, D, DU, B, INFO=info )
(), INTENT(INOUT) :: DL(:), D(:), DU(:),
INTEGER, INTENT(OUT), OPTIONAL :: INFO
where
::= REAL | COMPLEX
::= KIND(1.0) | KIND(1.0D0)
::= B(:,:) | B(:)
Arguments
=========
DL (input/output) REAL or COMPLEX array, shape (:) with
size(DL) = n-1, where n is the order of A.
On entry, the subdiagonal of A.
On exit, the n-2 elements of the second superdiagonal of U in
DL(1),..., DL(n-2).
D (input/output) REAL or COMPLEX array, shape (:) with size(D) = n.
On entry, the diagonal of A.
On exit, the diagonal of U .
DU (input/output) REAL or COMPLEX array, shape (:) with
size(DL) = n-1.
On entry, the superdiagonal of A.
On exit, the first superdiagonal of U .
B (input/output) REAL or COMPLEX array, shape (:,:) with
size(B,1) = n or shape (:) with size(B) = n.
On entry, the matrix B.
On exit, the solution matrix X .
INFO Optional (output) INTEGER
= 0: successful exit.
< 0: if INFO = -i, the i-th argument had an illegal value.
> 0: if INFO = i, then U(i,i) = 0. The factorization has not been
completed unless i = n. The factor U 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.