Developer Reference

  • 2020.2
  • 07/15/2020
  • Public Content
Contents

?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
A
T
*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
.