LSLTQ
Solves a complex tridiagonal system of linear equations.
Required Arguments
C — Complex vector of length N containing the subdiagonal of the tridiagonal matrix in C(2) through C(N). (Input/Output)
On output C is destroyed.
D — Complex vector of length N containing the diagonal of the tridiagonal matrix. (Input/Output)
On output D is destroyed.
E — Complex vector of length N containing the superdiagonal of the tridiagonal matrix in E(1) through E(N - 1). (Input/Output)
On output E is destroyed.
B — Complex vector of length N containing the right-hand side of the linear system on entry and the solution vector on return. (Input/Output)
Optional Arguments
N — Order of the tridiagonal matrix. (Input)
Default: N = size (C,1).
FORTRAN 90 Interface
Generic: CALL LSLTQ (C, D, E, B [, …])
Specific: The specific interface names are S_LSLTQ and D_LSLTQ.
FORTRAN 77 Interface
Single: CALL LSLTQ (N, C, D, E, B)
Double: The double precision name is DLSLTQ.
Description
Routine LSLTQ factors and solves the complex tridiagonal linear system Ax = b. LSLTQ is intended just for tridiagonal systems. The coefficient matrix does not have to be symmetric. The algorithm is Gaussian elimination with pivoting for numerical stability. See Dongarra et al. (1979), LINPACK subprograms CGTSL/ZGTSL, for details. When computing on vector or parallel computers the cyclic reduction algorithm, LSLCQ, should be considered as an alternative method to solve the system.
Informational error
Type
Code
Description
4
2
An element along the diagonal became exactly zero during execution.
Example
A system of n = 4 linear equations is solved.

USE LSLTQ_INT
USE WRCRL_INT
! Declaration of variables
INTEGER N
PARAMETER (N=4)
!
COMPLEX B(N), C(N), D(N), E(N)
CHARACTER CLABEL(1)*6, FMT*8, RLABEL(1)*4
!
DATA FMT/’(E13.6)’/
DATA CLABEL/’NUMBER’/
DATA RLABEL/’NONE’/
! C(*), D(*), E(*) and B(*)
! contain the subdiagonal,
! diagonal, superdiagonal and
! right hand side.
DATA C/(0.0,0.0), (-9.0,3.0), (2.0,7.0), (7.0,-4.0)/
DATA D/(3.0,-5.0), (4.0,-9.0), (-5.0,-7.0), (-2.0,-3.0)/
DATA E/(-9.0,8.0), (1.0,8.0), (8.0,3.0), (0.0,0.0)/
DATA B/(-16.0,-93.0), (128.0,179.0), (-60.0,-12.0), (9.0,-108.0)/
!
!
CALL LSLTQ (C, D, E, B)
! Output the solution.
CALL WRCRL (’Solution:’, B, RLABEL, CLABEL, 1, N, 1, FMT=FMT)
END
Output

Solution:
1 2
(-0.400000E+01,-0.700000E+01) (-0.700000E+01, 0.400000E+01)
3 4
( 0.700000E+01,-0.700000E+01) ( 0.900000E+01, 0.200000E+01)