129 SUBROUTINE dgtts2( ITRANS, N, NRHS, DL, D, DU, DU2, IPIV, B, LDB )
137 INTEGER ITRANS, LDB, N, NRHS
141 DOUBLE PRECISION B( ldb, * ), D( * ), DL( * ), DU( * ), DU2( * )
148 DOUBLE PRECISION TEMP
154 IF( n.EQ.0 .OR. nrhs.EQ.0 )
157 IF( itrans.EQ.0 )
THEN
170 temp = b( i+1-ip+i, j ) - dl( i )*b( ip, j )
171 b( i, j ) = b( ip, j )
177 b( n, j ) = b( n, j ) / d( n )
179 $ b( n-1, j ) = ( b( n-1, j )-du( n-1 )*b( n, j ) ) /
181 DO 30 i = n - 2, 1, -1
182 b( i, j ) = ( b( i, j )-du( i )*b( i+1, j )-du2( i )*
183 $ b( i+2, j ) ) / d( i )
195 IF( ipiv( i ).EQ.i )
THEN
196 b( i+1, j ) = b( i+1, j ) - dl( i )*b( i, j )
199 b( i, j ) = b( i+1, j )
200 b( i+1, j ) = temp - dl( i )*b( i, j )
206 b( n, j ) = b( n, j ) / d( n )
208 $ b( n-1, j ) = ( b( n-1, j )-du( n-1 )*b( n, j ) ) /
210 DO 50 i = n - 2, 1, -1
211 b( i, j ) = ( b( i, j )-du( i )*b( i+1, j )-du2( i )*
212 $ b( i+2, j ) ) / d( i )
226 b( 1, j ) = b( 1, j ) / d( 1 )
228 $ b( 2, j ) = ( b( 2, j )-du( 1 )*b( 1, j ) ) / d( 2 )
230 b( i, j ) = ( b( i, j )-du( i-1 )*b( i-1, j )-du2( i-2 )*
231 $ b( i-2, j ) ) / d( i )
236 DO 90 i = n - 1, 1, -1
238 temp = b( i, j ) - dl( i )*b( i+1, j )
239 b( i, j ) = b( ip, j )
252 b( 1, j ) = b( 1, j ) / d( 1 )
254 $ b( 2, j ) = ( b( 2, j )-du( 1 )*b( 1, j ) ) / d( 2 )
256 b( i, j ) = ( b( i, j )-du( i-1 )*b( i-1, j )-
257 $ du2( i-2 )*b( i-2, j ) ) / d( i )
259 DO 110 i = n - 1, 1, -1
260 IF( ipiv( i ).EQ.i )
THEN
261 b( i, j ) = b( i, j ) - dl( i )*b( i+1, j )
264 b( i+1, j ) = b( i, j ) - dl( i )*temp
subroutine dgtts2(ITRANS, N, NRHS, DL, D, DU, DU2, IPIV, B, LDB)
DGTTS2 solves a system of linear equations with a tridiagonal matrix using the LU factorization compu...