01:SUBROUTINEDPTSV( N, NRHS, D, E, B, LDB, INFO ) 02:*03:* -- LAPACK routine (version 3.2) --04:* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..05:* November 200606:*07:* .. Scalar Arguments ..08: INTEGER INFO, LDB, N, NRHS 09:* ..10:* .. Array Arguments ..11: DOUBLE PRECISIONB( LDB, * ),D( * ),E( * ) 12:* ..13:*14:* Purpose15:* =======16:*17:* DPTSV computes the solution to a real system of linear equations18:* A*X = B, where A is an N-by-N symmetric positive definite tridiagonal19:* matrix, and X and B are N-by-NRHS matrices.20:*21:* A is factored as A = L*D*L**T, and the factored form of A is then22:* used to solve the system of equations.23:*24:* Arguments25:* =========26:*27:* N (input) INTEGER28:* The order of the matrix A. N >= 0.29:*30:* NRHS (input) INTEGER31:* The number of right hand sides, i.e., the number of columns32:* of the matrix B. NRHS >= 0.33:*34:* D (input/output) DOUBLE PRECISION array, dimension (N)35:* On entry, the n diagonal elements of the tridiagonal matrix36:* A. On exit, the n diagonal elements of the diagonal matrix37:* D from the factorization A = L*D*L**T.38:*39:* E (input/output) DOUBLE PRECISION array, dimension (N-1)40:* On entry, the (n-1) subdiagonal elements of the tridiagonal41:* matrix A. On exit, the (n-1) subdiagonal elements of the42:* unit bidiagonal factor L from the L*D*L**T factorization of43:* A. (E can also be regarded as the superdiagonal of the unit44:* bidiagonal factor U from the U**T*D*U factorization of A.)45:*46:* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)47:* On entry, the N-by-NRHS right hand side matrix B.48:* On exit, if INFO = 0, the N-by-NRHS solution matrix X.49:*50:* LDB (input) INTEGER51:* The leading dimension of the array B. LDB >= max(1,N).52:*53:* INFO (output) INTEGER54:* = 0: successful exit55:* < 0: if INFO = -i, the i-th argument had an illegal value56:* > 0: if INFO = i, the leading minor of order i is not57:* positive definite, and the solution has not been58:* computed. The factorization has not been completed59:* unless i = N.60:*61:* =====================================================================62:*63:* .. External Subroutines ..64:EXTERNALDPTTRF, DPTTRS, XERBLA 65:* ..66:* .. Intrinsic Functions ..67:INTRINSICMAX 68:* ..69:* .. Executable Statements ..70:*71:* Test the input parameters.72:*73: INFO = 0 74:IF( N.LT.0 )THEN75: INFO = -1 76:ELSEIF( NRHS.LT.0 )THEN77: INFO = -2 78:ELSEIF( LDB.LT.MAX( 1, N ) )THEN79: INFO = -6 80:ENDIF81:IF( INFO.NE.0 )THEN82:CALLXERBLA( 'DPTSV ', -INFO ) 83:RETURN84:ENDIF85:*86:* Compute the L*D*L' (or U'*D*U) factorization of A.87:*88:CALLDPTTRF( N, D, E, INFO ) 89:IF( INFO.EQ.0 )THEN90:*91:* Solve the system A*X = B, overwriting B with X.92:*93:CALLDPTTRS( N, NRHS, D, E, B, LDB, INFO ) 94:ENDIF95:RETURN96:*97:* End of DPTSV98:*99:END100: