Visible to Intel only — GUID: GUID-1811FAD9-A0DB-4845-9F2C-7CE5D07BDF15
Visible to Intel only — GUID: GUID-1811FAD9-A0DB-4845-9F2C-7CE5D07BDF15
?gtsv
Computes the solution to the system of linear equations with a tridiagonal coefficient matrix A and multiple right-hand sides.
Syntax
call sgtsv( n, nrhs, dl, d, du, b, ldb, info )
call dgtsv( n, nrhs, dl, d, du, b, ldb, info )
call cgtsv( n, nrhs, dl, d, du, b, ldb, info )
call zgtsv( n, nrhs, dl, d, du, b, ldb, info )
call gtsv( dl, d, du, b [,info] )
Include Files
- mkl.fi, lapack.f90
Description
The routine solves for X the system of linear equations A*X = B, where A is an n-by-n tridiagonal matrix, the columns of matrix B are individual right-hand sides, and the columns of X are the corresponding solutions. The routine uses Gaussian elimination with partial pivoting.
Note that the equation AT*X = B may be solved by interchanging the order of the arguments du and dl.
Input Parameters
n |
INTEGER. The order of A, the number of rows in B; n≥ 0. |
nrhs |
INTEGER. The number of right-hand sides, the number of columns in B; nrhs≥ 0. |
dl |
REAL for sgtsv DOUBLE PRECISION for dgtsv COMPLEX for cgtsv DOUBLE COMPLEX for zgtsv. The array dl (size n - 1) contains the (n - 1) subdiagonal elements of A. |
d |
REAL for sgtsv DOUBLE PRECISION for dgtsv COMPLEX for cgtsv DOUBLE COMPLEX for zgtsv. The array d (size n) contains the diagonal elements of A. |
du |
REAL for sgtsv DOUBLE PRECISION for dgtsv COMPLEX for cgtsv DOUBLE COMPLEX for zgtsv. The array du (size n - 1) contains the (n - 1) superdiagonal elements of A. |
b |
REAL for sgtsv DOUBLE PRECISION for dgtsv COMPLEX for cgtsv DOUBLE COMPLEX for zgtsv. The array b(size ldb by *) contains the matrix B whose columns are the right-hand sides for the systems of equations. The second dimension of b must be at least max(1,nrhs). |
ldb |
INTEGER. The leading dimension of b; ldb≥ max(1, n). |
Output Parameters
dl |
Overwritten by the (n-2) elements of the second superdiagonal of the upper triangular matrix U from the LU factorization of A. These elements are stored in dl(1), ..., dl(n - 2). |
d |
Overwritten by the n diagonal elements of U. |
du |
Overwritten by the (n-1) elements of the first superdiagonal of U. |
b |
Overwritten by the solution matrix X. |
info |
INTEGER. If info = 0, the execution is successful. If info = -i, the i-th parameter had an illegal value. If info = i, U(i, i) is exactly zero, and the solution has not been computed. The factorization has not been completed unless i = n. |
LAPACK 95 Interface Notes
Routines in Fortran 95 interface have fewer arguments in the calling sequence than their FORTRAN 77 counterparts. For general conventions applied to skip redundant or reconstructible arguments, see LAPACK 95 Interface Conventions.
Specific details for the routine gtsv interface are as follows:
dl |
Holds the vector of length (n-1). |
d |
Holds the vector of length n. |
dl |
Holds the vector of length (n-1). |
b |
Holds the matrix B of size (n,nrhs). |