LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
subroutine zpttrf ( integer  N,
double precision, dimension( * )  D,
complex*16, dimension( * )  E,
integer  INFO 
)

ZPTTRF

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

Purpose:
 ZPTTRF computes the L*D*L**H factorization of a complex Hermitian
 positive definite tridiagonal matrix A.  The factorization may also
 be regarded as having the form A = U**H *D*U.
Parameters
[in]N
          N is INTEGER
          The order of the matrix A.  N >= 0.
[in,out]D
          D is DOUBLE PRECISION array, dimension (N)
          On entry, the n diagonal elements of the tridiagonal matrix
          A.  On exit, the n diagonal elements of the diagonal matrix
          D from the L*D*L**H factorization of A.
[in,out]E
          E is COMPLEX*16 array, dimension (N-1)
          On entry, the (n-1) subdiagonal elements of the tridiagonal
          matrix A.  On exit, the (n-1) subdiagonal elements of the
          unit bidiagonal factor L from the L*D*L**H factorization of A.
          E can also be regarded as the superdiagonal of the unit
          bidiagonal factor U from the U**H *D*U factorization of A.
[out]INFO
          INFO is INTEGER
          = 0: successful exit
          < 0: if INFO = -k, the k-th argument had an illegal value
          > 0: if INFO = k, the leading minor of order k is not
               positive definite; if k < N, the factorization could not
               be completed, while if k = N, the factorization was
               completed, but D(N) <= 0.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
September 2012

Definition at line 94 of file zpttrf.f.

94 *
95 * -- LAPACK computational routine (version 3.4.2) --
96 * -- LAPACK is a software package provided by Univ. of Tennessee, --
97 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
98 * September 2012
99 *
100 * .. Scalar Arguments ..
101  INTEGER info, n
102 * ..
103 * .. Array Arguments ..
104  DOUBLE PRECISION d( * )
105  COMPLEX*16 e( * )
106 * ..
107 *
108 * =====================================================================
109 *
110 * .. Parameters ..
111  DOUBLE PRECISION zero
112  parameter ( zero = 0.0d+0 )
113 * ..
114 * .. Local Scalars ..
115  INTEGER i, i4
116  DOUBLE PRECISION eii, eir, f, g
117 * ..
118 * .. External Subroutines ..
119  EXTERNAL xerbla
120 * ..
121 * .. Intrinsic Functions ..
122  INTRINSIC dble, dcmplx, dimag, mod
123 * ..
124 * .. Executable Statements ..
125 *
126 * Test the input parameters.
127 *
128  info = 0
129  IF( n.LT.0 ) THEN
130  info = -1
131  CALL xerbla( 'ZPTTRF', -info )
132  RETURN
133  END IF
134 *
135 * Quick return if possible
136 *
137  IF( n.EQ.0 )
138  $ RETURN
139 *
140 * Compute the L*D*L**H (or U**H *D*U) factorization of A.
141 *
142  i4 = mod( n-1, 4 )
143  DO 10 i = 1, i4
144  IF( d( i ).LE.zero ) THEN
145  info = i
146  GO TO 30
147  END IF
148  eir = dble( e( i ) )
149  eii = dimag( e( i ) )
150  f = eir / d( i )
151  g = eii / d( i )
152  e( i ) = dcmplx( f, g )
153  d( i+1 ) = d( i+1 ) - f*eir - g*eii
154  10 CONTINUE
155 *
156  DO 20 i = i4 + 1, n - 4, 4
157 *
158 * Drop out of the loop if d(i) <= 0: the matrix is not positive
159 * definite.
160 *
161  IF( d( i ).LE.zero ) THEN
162  info = i
163  GO TO 30
164  END IF
165 *
166 * Solve for e(i) and d(i+1).
167 *
168  eir = dble( e( i ) )
169  eii = dimag( e( i ) )
170  f = eir / d( i )
171  g = eii / d( i )
172  e( i ) = dcmplx( f, g )
173  d( i+1 ) = d( i+1 ) - f*eir - g*eii
174 *
175  IF( d( i+1 ).LE.zero ) THEN
176  info = i + 1
177  GO TO 30
178  END IF
179 *
180 * Solve for e(i+1) and d(i+2).
181 *
182  eir = dble( e( i+1 ) )
183  eii = dimag( e( i+1 ) )
184  f = eir / d( i+1 )
185  g = eii / d( i+1 )
186  e( i+1 ) = dcmplx( f, g )
187  d( i+2 ) = d( i+2 ) - f*eir - g*eii
188 *
189  IF( d( i+2 ).LE.zero ) THEN
190  info = i + 2
191  GO TO 30
192  END IF
193 *
194 * Solve for e(i+2) and d(i+3).
195 *
196  eir = dble( e( i+2 ) )
197  eii = dimag( e( i+2 ) )
198  f = eir / d( i+2 )
199  g = eii / d( i+2 )
200  e( i+2 ) = dcmplx( f, g )
201  d( i+3 ) = d( i+3 ) - f*eir - g*eii
202 *
203  IF( d( i+3 ).LE.zero ) THEN
204  info = i + 3
205  GO TO 30
206  END IF
207 *
208 * Solve for e(i+3) and d(i+4).
209 *
210  eir = dble( e( i+3 ) )
211  eii = dimag( e( i+3 ) )
212  f = eir / d( i+3 )
213  g = eii / d( i+3 )
214  e( i+3 ) = dcmplx( f, g )
215  d( i+4 ) = d( i+4 ) - f*eir - g*eii
216  20 CONTINUE
217 *
218 * Check d(n) for positive definiteness.
219 *
220  IF( d( n ).LE.zero )
221  $ info = n
222 *
223  30 CONTINUE
224  RETURN
225 *
226 * End of ZPTTRF
227 *
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62

Here is the call graph for this function:

Here is the caller graph for this function: