![]() |
LAPACK
3.4.1
LAPACK: Linear Algebra PACKage
|
00001 *> \brief \b DPTSV 00002 * 00003 * =========== DOCUMENTATION =========== 00004 * 00005 * Online html documentation available at 00006 * http://www.netlib.org/lapack/explore-html/ 00007 * 00008 *> \htmlonly 00009 *> Download DPTSV + dependencies 00010 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dptsv.f"> 00011 *> [TGZ]</a> 00012 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dptsv.f"> 00013 *> [ZIP]</a> 00014 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dptsv.f"> 00015 *> [TXT]</a> 00016 *> \endhtmlonly 00017 * 00018 * Definition: 00019 * =========== 00020 * 00021 * SUBROUTINE DPTSV( N, NRHS, D, E, B, LDB, INFO ) 00022 * 00023 * .. Scalar Arguments .. 00024 * INTEGER INFO, LDB, N, NRHS 00025 * .. 00026 * .. Array Arguments .. 00027 * DOUBLE PRECISION B( LDB, * ), D( * ), E( * ) 00028 * .. 00029 * 00030 * 00031 *> \par Purpose: 00032 * ============= 00033 *> 00034 *> \verbatim 00035 *> 00036 *> DPTSV computes the solution to a real system of linear equations 00037 *> A*X = B, where A is an N-by-N symmetric positive definite tridiagonal 00038 *> matrix, and X and B are N-by-NRHS matrices. 00039 *> 00040 *> A is factored as A = L*D*L**T, and the factored form of A is then 00041 *> used to solve the system of equations. 00042 *> \endverbatim 00043 * 00044 * Arguments: 00045 * ========== 00046 * 00047 *> \param[in] N 00048 *> \verbatim 00049 *> N is INTEGER 00050 *> The order of the matrix A. N >= 0. 00051 *> \endverbatim 00052 *> 00053 *> \param[in] NRHS 00054 *> \verbatim 00055 *> NRHS is INTEGER 00056 *> The number of right hand sides, i.e., the number of columns 00057 *> of the matrix B. NRHS >= 0. 00058 *> \endverbatim 00059 *> 00060 *> \param[in,out] D 00061 *> \verbatim 00062 *> D is DOUBLE PRECISION array, dimension (N) 00063 *> On entry, the n diagonal elements of the tridiagonal matrix 00064 *> A. On exit, the n diagonal elements of the diagonal matrix 00065 *> D from the factorization A = L*D*L**T. 00066 *> \endverbatim 00067 *> 00068 *> \param[in,out] E 00069 *> \verbatim 00070 *> E is DOUBLE PRECISION array, dimension (N-1) 00071 *> On entry, the (n-1) subdiagonal elements of the tridiagonal 00072 *> matrix A. On exit, the (n-1) subdiagonal elements of the 00073 *> unit bidiagonal factor L from the L*D*L**T factorization of 00074 *> A. (E can also be regarded as the superdiagonal of the unit 00075 *> bidiagonal factor U from the U**T*D*U factorization of A.) 00076 *> \endverbatim 00077 *> 00078 *> \param[in,out] B 00079 *> \verbatim 00080 *> B is DOUBLE PRECISION array, dimension (LDB,NRHS) 00081 *> On entry, the N-by-NRHS right hand side matrix B. 00082 *> On exit, if INFO = 0, the N-by-NRHS solution matrix X. 00083 *> \endverbatim 00084 *> 00085 *> \param[in] LDB 00086 *> \verbatim 00087 *> LDB is INTEGER 00088 *> The leading dimension of the array B. LDB >= max(1,N). 00089 *> \endverbatim 00090 *> 00091 *> \param[out] INFO 00092 *> \verbatim 00093 *> INFO is INTEGER 00094 *> = 0: successful exit 00095 *> < 0: if INFO = -i, the i-th argument had an illegal value 00096 *> > 0: if INFO = i, the leading minor of order i is not 00097 *> positive definite, and the solution has not been 00098 *> computed. The factorization has not been completed 00099 *> unless i = N. 00100 *> \endverbatim 00101 * 00102 * Authors: 00103 * ======== 00104 * 00105 *> \author Univ. of Tennessee 00106 *> \author Univ. of California Berkeley 00107 *> \author Univ. of Colorado Denver 00108 *> \author NAG Ltd. 00109 * 00110 *> \date November 2011 00111 * 00112 *> \ingroup doubleOTHERcomputational 00113 * 00114 * ===================================================================== 00115 SUBROUTINE DPTSV( N, NRHS, D, E, B, LDB, INFO ) 00116 * 00117 * -- LAPACK computational routine (version 3.4.0) -- 00118 * -- LAPACK is a software package provided by Univ. of Tennessee, -- 00119 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 00120 * November 2011 00121 * 00122 * .. Scalar Arguments .. 00123 INTEGER INFO, LDB, N, NRHS 00124 * .. 00125 * .. Array Arguments .. 00126 DOUBLE PRECISION B( LDB, * ), D( * ), E( * ) 00127 * .. 00128 * 00129 * ===================================================================== 00130 * 00131 * .. External Subroutines .. 00132 EXTERNAL DPTTRF, DPTTRS, XERBLA 00133 * .. 00134 * .. Intrinsic Functions .. 00135 INTRINSIC MAX 00136 * .. 00137 * .. Executable Statements .. 00138 * 00139 * Test the input parameters. 00140 * 00141 INFO = 0 00142 IF( N.LT.0 ) THEN 00143 INFO = -1 00144 ELSE IF( NRHS.LT.0 ) THEN 00145 INFO = -2 00146 ELSE IF( LDB.LT.MAX( 1, N ) ) THEN 00147 INFO = -6 00148 END IF 00149 IF( INFO.NE.0 ) THEN 00150 CALL XERBLA( 'DPTSV ', -INFO ) 00151 RETURN 00152 END IF 00153 * 00154 * Compute the L*D*L**T (or U**T*D*U) factorization of A. 00155 * 00156 CALL DPTTRF( N, D, E, INFO ) 00157 IF( INFO.EQ.0 ) THEN 00158 * 00159 * Solve the system A*X = B, overwriting B with X. 00160 * 00161 CALL DPTTRS( N, NRHS, D, E, B, LDB, INFO ) 00162 END IF 00163 RETURN 00164 * 00165 * End of DPTSV 00166 * 00167 END