LAPACK 3.12.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ dpttrs()

subroutine dpttrs ( integer  n,
integer  nrhs,
double precision, dimension( * )  d,
double precision, dimension( * )  e,
double precision, dimension( ldb, * )  b,
integer  ldb,
integer  info 
)

DPTTRS

Download DPTTRS + dependencies [TGZ] [ZIP] [TXT]

Purpose:
 DPTTRS solves a tridiagonal system of the form
    A * X = B
 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
 matrix whose subdiagonal is specified in the vector E, and X and B
 are N by NRHS matrices.
Parameters
[in]N
          N is INTEGER
          The order of the tridiagonal matrix A.  N >= 0.
[in]NRHS
          NRHS is INTEGER
          The number of right hand sides, i.e., the number of columns
          of the matrix B.  NRHS >= 0.
[in]D
          D is DOUBLE PRECISION array, dimension (N)
          The n diagonal elements of the diagonal matrix D from the
          L*D*L**T factorization of A.
[in]E
          E is DOUBLE PRECISION array, dimension (N-1)
          The (n-1) subdiagonal elements of the unit bidiagonal factor
          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
          factorization A = U**T*D*U.
[in,out]B
          B is DOUBLE PRECISION array, dimension (LDB,NRHS)
          On entry, the right hand side vectors B for the system of
          linear equations.
          On exit, the solution vectors, X.
[in]LDB
          LDB is INTEGER
          The leading dimension of the array B.  LDB >= max(1,N).
[out]INFO
          INFO is INTEGER
          = 0: successful exit
          < 0: if INFO = -k, the k-th argument had an illegal value
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.

Definition at line 108 of file dpttrs.f.

109*
110* -- LAPACK computational routine --
111* -- LAPACK is a software package provided by Univ. of Tennessee, --
112* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
113*
114* .. Scalar Arguments ..
115 INTEGER INFO, LDB, N, NRHS
116* ..
117* .. Array Arguments ..
118 DOUBLE PRECISION B( LDB, * ), D( * ), E( * )
119* ..
120*
121* =====================================================================
122*
123* .. Local Scalars ..
124 INTEGER J, JB, NB
125* ..
126* .. External Functions ..
127 INTEGER ILAENV
128 EXTERNAL ilaenv
129* ..
130* .. External Subroutines ..
131 EXTERNAL dptts2, xerbla
132* ..
133* .. Intrinsic Functions ..
134 INTRINSIC max, min
135* ..
136* .. Executable Statements ..
137*
138* Test the input arguments.
139*
140 info = 0
141 IF( n.LT.0 ) THEN
142 info = -1
143 ELSE IF( nrhs.LT.0 ) THEN
144 info = -2
145 ELSE IF( ldb.LT.max( 1, n ) ) THEN
146 info = -6
147 END IF
148 IF( info.NE.0 ) THEN
149 CALL xerbla( 'DPTTRS', -info )
150 RETURN
151 END IF
152*
153* Quick return if possible
154*
155 IF( n.EQ.0 .OR. nrhs.EQ.0 )
156 $ RETURN
157*
158* Determine the number of right-hand sides to solve at a time.
159*
160 IF( nrhs.EQ.1 ) THEN
161 nb = 1
162 ELSE
163 nb = max( 1, ilaenv( 1, 'DPTTRS', ' ', n, nrhs, -1, -1 ) )
164 END IF
165*
166 IF( nb.GE.nrhs ) THEN
167 CALL dptts2( n, nrhs, d, e, b, ldb )
168 ELSE
169 DO 10 j = 1, nrhs, nb
170 jb = min( nrhs-j+1, nb )
171 CALL dptts2( n, jb, d, e, b( 1, j ), ldb )
172 10 CONTINUE
173 END IF
174*
175 RETURN
176*
177* End of DPTTRS
178*
subroutine xerbla(srname, info)
Definition cblat2.f:3285
integer function ilaenv(ispec, name, opts, n1, n2, n3, n4)
ILAENV
Definition ilaenv.f:162
subroutine dptts2(n, nrhs, d, e, b, ldb)
DPTTS2 solves a tridiagonal system of the form AX=B using the L D LH factorization computed by spttrf...
Definition dptts2.f:102
Here is the call graph for this function:
Here is the caller graph for this function: