127 SUBROUTINE zgtts2( ITRANS, N, NRHS, DL, D, DU, DU2, IPIV, B, LDB )
134 INTEGER ITRANS, LDB, N, NRHS
138 COMPLEX*16 B( LDB, * ), D( * ), DL( * ), DU( * ), DU2( * )
154 IF( n.EQ.0 .OR. nrhs.EQ.0 )
157 IF( itrans.EQ.0 )
THEN
169 IF( ipiv( i ).EQ.i )
THEN
170 b( i+1, j ) = b( i+1, j ) - dl( i )*b( i, j )
173 b( i, j ) = b( i+1, j )
174 b( i+1, j ) = temp - dl( i )*b( i, j )
180 b( n, j ) = b( n, j ) / d( n )
182 $ b( n-1, j ) = ( b( n-1, j )-du( n-1 )*b( n, j ) ) /
184 DO 30 i = n - 2, 1, -1
185 b( i, j ) = ( b( i, j )-du( i )*b( i+1, j )-du2( i )*
186 $ b( i+2, j ) ) / d( i )
198 IF( ipiv( i ).EQ.i )
THEN
199 b( i+1, j ) = b( i+1, j ) - dl( i )*b( i, j )
202 b( i, j ) = b( i+1, j )
203 b( i+1, j ) = temp - dl( i )*b( i, j )
209 b( n, j ) = b( n, j ) / d( n )
211 $ b( n-1, j ) = ( b( n-1, j )-du( n-1 )*b( n, j ) ) /
213 DO 50 i = n - 2, 1, -1
214 b( i, j ) = ( b( i, j )-du( i )*b( i+1, j )-du2( i )*
215 $ b( i+2, j ) ) / d( i )
219 ELSE IF( itrans.EQ.1 )
THEN
229 b( 1, j ) = b( 1, j ) / d( 1 )
231 $ b( 2, j ) = ( b( 2, j )-du( 1 )*b( 1, j ) ) / d( 2 )
233 b( i, j ) = ( b( i, j )-du( i-1 )*b( i-1, j )-du2( i-2 )*
234 $ b( i-2, j ) ) / d( i )
239 DO 90 i = n - 1, 1, -1
240 IF( ipiv( i ).EQ.i )
THEN
241 b( i, j ) = b( i, j ) - dl( i )*b( i+1, j )
244 b( i+1, j ) = b( i, j ) - dl( i )*temp
257 b( 1, j ) = b( 1, j ) / d( 1 )
259 $ b( 2, j ) = ( b( 2, j )-du( 1 )*b( 1, j ) ) / d( 2 )
261 b( i, j ) = ( b( i, j )-du( i-1 )*b( i-1, j )-
262 $ du2( i-2 )*b( i-2, j ) ) / d( i )
267 DO 110 i = n - 1, 1, -1
268 IF( ipiv( i ).EQ.i )
THEN
269 b( i, j ) = b( i, j ) - dl( i )*b( i+1, j )
272 b( i+1, j ) = b( i, j ) - dl( i )*temp
288 b( 1, j ) = b( 1, j ) / dconjg( d( 1 ) )
290 $ b( 2, j ) = ( b( 2, j )-dconjg( du( 1 ) )*b( 1, j ) ) /
293 b( i, j ) = ( b( i, j )-dconjg( du( i-1 ) )*b( i-1, j )-
294 $ dconjg( du2( i-2 ) )*b( i-2, j ) ) /
300 DO 150 i = n - 1, 1, -1
301 IF( ipiv( i ).EQ.i )
THEN
302 b( i, j ) = b( i, j ) - dconjg( dl( i ) )*b( i+1, j )
305 b( i+1, j ) = b( i, j ) - dconjg( dl( i ) )*temp
318 b( 1, j ) = b( 1, j ) / dconjg( d( 1 ) )
320 $ b( 2, j ) = ( b( 2, j )-dconjg( du( 1 ) )*b( 1, j ) )
323 b( i, j ) = ( b( i, j )-dconjg( du( i-1 ) )*
324 $ b( i-1, j )-dconjg( du2( i-2 ) )*
325 $ b( i-2, j ) ) / dconjg( d( i ) )
330 DO 170 i = n - 1, 1, -1
331 IF( ipiv( i ).EQ.i )
THEN
332 b( i, j ) = b( i, j ) - dconjg( dl( i ) )*
336 b( i+1, j ) = b( i, j ) - dconjg( dl( i ) )*temp
subroutine zgtts2(itrans, n, nrhs, dl, d, du, du2, ipiv, b, ldb)
ZGTTS2 solves a system of linear equations with a tridiagonal matrix using the LU factorization compu...