version 1.7, 2010/12/21 13:53:37
|
version 1.8, 2011/07/22 07:38:10
|
Line 1
|
Line 1
|
SUBROUTINE DPTTS2( N, NRHS, D, E, B, LDB ) |
SUBROUTINE DPTTS2( N, NRHS, D, E, B, LDB ) |
* |
* |
* -- LAPACK routine (version 3.2) -- |
* -- LAPACK routine (version 3.3.1) -- |
* -- LAPACK is a software package provided by Univ. of Tennessee, -- |
* -- LAPACK is a software package provided by Univ. of Tennessee, -- |
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- |
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- |
* November 2006 |
* -- April 2011 -- |
* |
* |
* .. Scalar Arguments .. |
* .. Scalar Arguments .. |
INTEGER LDB, N, NRHS |
INTEGER LDB, N, NRHS |
Line 17
|
Line 17
|
* |
* |
* DPTTS2 solves a tridiagonal system of the form |
* DPTTS2 solves a tridiagonal system of the form |
* A * X = B |
* A * X = B |
* using the L*D*L' factorization of A computed by DPTTRF. D is a |
* using the L*D*L**T factorization of A computed by DPTTRF. D is a |
* diagonal matrix specified in the vector D, L is a unit bidiagonal |
* diagonal matrix specified in the vector D, L is a unit bidiagonal |
* matrix whose subdiagonal is specified in the vector E, and X and B |
* matrix whose subdiagonal is specified in the vector E, and X and B |
* are N by NRHS matrices. |
* are N by NRHS matrices. |
Line 34
|
Line 34
|
* |
* |
* D (input) DOUBLE PRECISION array, dimension (N) |
* D (input) DOUBLE PRECISION array, dimension (N) |
* The n diagonal elements of the diagonal matrix D from the |
* The n diagonal elements of the diagonal matrix D from the |
* L*D*L' factorization of A. |
* L*D*L**T factorization of A. |
* |
* |
* E (input) DOUBLE PRECISION array, dimension (N-1) |
* E (input) DOUBLE PRECISION array, dimension (N-1) |
* The (n-1) subdiagonal elements of the unit bidiagonal factor |
* The (n-1) subdiagonal elements of the unit bidiagonal factor |
* L from the L*D*L' factorization of A. E can also be regarded |
* L from the L*D*L**T factorization of A. E can also be regarded |
* as the superdiagonal of the unit bidiagonal factor U from the |
* as the superdiagonal of the unit bidiagonal factor U from the |
* factorization A = U'*D*U. |
* factorization A = U**T*D*U. |
* |
* |
* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS) |
* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS) |
* On entry, the right hand side vectors B for the system of |
* On entry, the right hand side vectors B for the system of |
Line 68
|
Line 68
|
RETURN |
RETURN |
END IF |
END IF |
* |
* |
* Solve A * X = B using the factorization A = L*D*L', |
* Solve A * X = B using the factorization A = L*D*L**T, |
* overwriting each right hand side vector with its solution. |
* overwriting each right hand side vector with its solution. |
* |
* |
DO 30 J = 1, NRHS |
DO 30 J = 1, NRHS |
Line 79
|
Line 79
|
B( I, J ) = B( I, J ) - B( I-1, J )*E( I-1 ) |
B( I, J ) = B( I, J ) - B( I-1, J )*E( I-1 ) |
10 CONTINUE |
10 CONTINUE |
* |
* |
* Solve D * L' * x = b. |
* Solve D * L**T * x = b. |
* |
* |
B( N, J ) = B( N, J ) / D( N ) |
B( N, J ) = B( N, J ) / D( N ) |
DO 20 I = N - 1, 1, -1 |
DO 20 I = N - 1, 1, -1 |