LAPACK  3.4.1
LAPACK: Linear Algebra PACKage
dpttrs.f
Go to the documentation of this file.
00001 *> \brief \b DPTTRS
00002 *
00003 *  =========== DOCUMENTATION ===========
00004 *
00005 * Online html documentation available at 
00006 *            http://www.netlib.org/lapack/explore-html/ 
00007 *
00008 *> \htmlonly
00009 *> Download DPTTRS + dependencies 
00010 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpttrs.f"> 
00011 *> [TGZ]</a> 
00012 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpttrs.f"> 
00013 *> [ZIP]</a> 
00014 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpttrs.f"> 
00015 *> [TXT]</a>
00016 *> \endhtmlonly 
00017 *
00018 *  Definition:
00019 *  ===========
00020 *
00021 *       SUBROUTINE DPTTRS( 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 *> DPTTRS solves a tridiagonal system of the form
00037 *>    A * X = B
00038 *> using the L*D*L**T factorization of A computed by DPTTRF.  D is a
00039 *> diagonal matrix specified in the vector D, L is a unit bidiagonal
00040 *> matrix whose subdiagonal is specified in the vector E, and X and B
00041 *> are N by NRHS matrices.
00042 *> \endverbatim
00043 *
00044 *  Arguments:
00045 *  ==========
00046 *
00047 *> \param[in] N
00048 *> \verbatim
00049 *>          N is INTEGER
00050 *>          The order of the tridiagonal 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] D
00061 *> \verbatim
00062 *>          D is DOUBLE PRECISION array, dimension (N)
00063 *>          The n diagonal elements of the diagonal matrix D from the
00064 *>          L*D*L**T factorization of A.
00065 *> \endverbatim
00066 *>
00067 *> \param[in] E
00068 *> \verbatim
00069 *>          E is DOUBLE PRECISION array, dimension (N-1)
00070 *>          The (n-1) subdiagonal elements of the unit bidiagonal factor
00071 *>          L from the L*D*L**T factorization of A.  E can also be regarded
00072 *>          as the superdiagonal of the unit bidiagonal factor U from the
00073 *>          factorization A = U**T*D*U.
00074 *> \endverbatim
00075 *>
00076 *> \param[in,out] B
00077 *> \verbatim
00078 *>          B is DOUBLE PRECISION array, dimension (LDB,NRHS)
00079 *>          On entry, the right hand side vectors B for the system of
00080 *>          linear equations.
00081 *>          On exit, the solution vectors, X.
00082 *> \endverbatim
00083 *>
00084 *> \param[in] LDB
00085 *> \verbatim
00086 *>          LDB is INTEGER
00087 *>          The leading dimension of the array B.  LDB >= max(1,N).
00088 *> \endverbatim
00089 *>
00090 *> \param[out] INFO
00091 *> \verbatim
00092 *>          INFO is INTEGER
00093 *>          = 0: successful exit
00094 *>          < 0: if INFO = -k, the k-th argument had an illegal value
00095 *> \endverbatim
00096 *
00097 *  Authors:
00098 *  ========
00099 *
00100 *> \author Univ. of Tennessee 
00101 *> \author Univ. of California Berkeley 
00102 *> \author Univ. of Colorado Denver 
00103 *> \author NAG Ltd. 
00104 *
00105 *> \date November 2011
00106 *
00107 *> \ingroup doubleOTHERcomputational
00108 *
00109 *  =====================================================================
00110       SUBROUTINE DPTTRS( N, NRHS, D, E, B, LDB, INFO )
00111 *
00112 *  -- LAPACK computational routine (version 3.4.0) --
00113 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
00114 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
00115 *     November 2011
00116 *
00117 *     .. Scalar Arguments ..
00118       INTEGER            INFO, LDB, N, NRHS
00119 *     ..
00120 *     .. Array Arguments ..
00121       DOUBLE PRECISION   B( LDB, * ), D( * ), E( * )
00122 *     ..
00123 *
00124 *  =====================================================================
00125 *
00126 *     .. Local Scalars ..
00127       INTEGER            J, JB, NB
00128 *     ..
00129 *     .. External Functions ..
00130       INTEGER            ILAENV
00131       EXTERNAL           ILAENV
00132 *     ..
00133 *     .. External Subroutines ..
00134       EXTERNAL           DPTTS2, XERBLA
00135 *     ..
00136 *     .. Intrinsic Functions ..
00137       INTRINSIC          MAX, MIN
00138 *     ..
00139 *     .. Executable Statements ..
00140 *
00141 *     Test the input arguments.
00142 *
00143       INFO = 0
00144       IF( N.LT.0 ) THEN
00145          INFO = -1
00146       ELSE IF( NRHS.LT.0 ) THEN
00147          INFO = -2
00148       ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
00149          INFO = -6
00150       END IF
00151       IF( INFO.NE.0 ) THEN
00152          CALL XERBLA( 'DPTTRS', -INFO )
00153          RETURN
00154       END IF
00155 *
00156 *     Quick return if possible
00157 *
00158       IF( N.EQ.0 .OR. NRHS.EQ.0 )
00159      $   RETURN
00160 *
00161 *     Determine the number of right-hand sides to solve at a time.
00162 *
00163       IF( NRHS.EQ.1 ) THEN
00164          NB = 1
00165       ELSE
00166          NB = MAX( 1, ILAENV( 1, 'DPTTRS', ' ', N, NRHS, -1, -1 ) )
00167       END IF
00168 *
00169       IF( NB.GE.NRHS ) THEN
00170          CALL DPTTS2( N, NRHS, D, E, B, LDB )
00171       ELSE
00172          DO 10 J = 1, NRHS, NB
00173             JB = MIN( NRHS-J+1, NB )
00174             CALL DPTTS2( N, JB, D, E, B( 1, J ), LDB )
00175    10    CONTINUE
00176       END IF
00177 *
00178       RETURN
00179 *
00180 *     End of DPTTRS
00181 *
00182       END
 All Files Functions