1 *> \brief \b ZLA_SYRPVGRW computes the reciprocal pivot growth factor norm(A)/norm(U) for a symmetric indefinite matrix.
3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
9 *> Download ZLA_SYRPVGRW + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zla_syrpvgrw.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zla_syrpvgrw.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zla_syrpvgrw.f">
21 * DOUBLE PRECISION FUNCTION ZLA_SYRPVGRW( UPLO, N, INFO, A, LDA, AF,
24 * .. Scalar Arguments ..
26 * INTEGER N, INFO, LDA, LDAF
28 * .. Array Arguments ..
29 * COMPLEX*16 A( LDA, * ), AF( LDAF, * )
30 * DOUBLE PRECISION WORK( * )
41 *> ZLA_SYRPVGRW computes the reciprocal pivot growth factor
42 *> norm(A)/norm(U). The "max absolute element" norm is used. If this is
43 *> much less than 1, the stability of the LU factorization of the
44 *> (equilibrated) matrix A could be poor. This also means that the
45 *> solution X, estimated condition numbers, and error bounds could be
54 *> UPLO is CHARACTER*1
55 *> = 'U': Upper triangle of A is stored;
56 *> = 'L': Lower triangle of A is stored.
62 *> The number of linear equations, i.e., the order of the
69 *> The value of INFO returned from ZSYTRF, .i.e., the pivot in
70 *> column INFO is exactly 0.
75 *> A is COMPLEX*16 array, dimension (LDA,N)
76 *> On entry, the N-by-N matrix A.
82 *> The leading dimension of the array A. LDA >= max(1,N).
87 *> AF is COMPLEX*16 array, dimension (LDAF,N)
88 *> The block diagonal matrix D and the multipliers used to
89 *> obtain the factor U or L as computed by ZSYTRF.
95 *> The leading dimension of the array AF. LDAF >= max(1,N).
100 *> IPIV is INTEGER array, dimension (N)
101 *> Details of the interchanges and the block structure of D
102 *> as determined by ZSYTRF.
107 *> WORK is DOUBLE PRECISION array, dimension (2*N)
113 *> \author Univ. of Tennessee
114 *> \author Univ. of California Berkeley
115 *> \author Univ. of Colorado Denver
118 *> \date November 2015
120 *> \ingroup complex16SYcomputational
122 * =====================================================================
123 DOUBLE PRECISION FUNCTION ZLA_SYRPVGRW( UPLO, N, INFO, A, LDA, AF,
126 * -- LAPACK computational routine (version 3.6.0) --
127 * -- LAPACK is a software package provided by Univ. of Tennessee, --
128 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
131 * .. Scalar Arguments ..
133 INTEGER N, INFO, LDA, LDAF
135 * .. Array Arguments ..
136 COMPLEX*16 A( LDA, * ), AF( LDAF, * )
137 DOUBLE PRECISION WORK( * )
141 * =====================================================================
143 * .. Local Scalars ..
144 INTEGER NCOLS, I, J, K, KP
145 DOUBLE PRECISION AMAX, UMAX, RPVGRW, TMP
149 * .. Intrinsic Functions ..
150 INTRINSIC ABS, REAL, DIMAG, MAX, MIN
152 * .. External Subroutines ..
156 * .. Statement Functions ..
157 DOUBLE PRECISION CABS1
159 * .. Statement Function Definitions ..
160 CABS1( ZDUM ) = ABS( DBLE ( ZDUM ) ) + ABS( DIMAG ( ZDUM ) )
162 * .. Executable Statements ..
164 UPPER = LSAME( 'Upper', UPLO )
165 IF ( INFO.EQ.0 ) THEN
180 * Find the max magnitude entry of each column of A. Compute the max
181 * for all N columns so we can apply the pivot permutation while
182 * looping below. Assume a full factorization is the common case.
187 WORK( N+I ) = MAX( CABS1( A( I, J ) ), WORK( N+I ) )
188 WORK( N+J ) = MAX( CABS1( A( I, J ) ), WORK( N+J ) )
194 WORK( N+I ) = MAX( CABS1( A( I, J ) ), WORK( N+I ) )
195 WORK( N+J ) = MAX( CABS1( A( I, J ) ), WORK( N+J ) )
200 * Now find the max magnitude entry of each column of U or L. Also
201 * permute the magnitudes of A above so they're in the same order as
204 * The iteration orders and permutations were copied from zsytrs.
205 * Calls to SSWAP would be severe overkill.
209 DO WHILE ( K .LT. NCOLS .AND. K.GT.0 )
210 IF ( IPIV( K ).GT.0 ) THEN
213 IF ( KP .NE. K ) THEN
215 WORK( N+K ) = WORK( N+KP )
219 WORK( K ) = MAX( CABS1( AF( I, K ) ), WORK( K ) )
226 WORK( N+K-1 ) = WORK( N+KP )
229 WORK( K ) = MAX( CABS1( AF( I, K ) ), WORK( K ) )
231 $ MAX( CABS1( AF( I, K-1 ) ), WORK( K-1 ) )
233 WORK( K ) = MAX( CABS1( AF( K, K ) ), WORK( K ) )
238 DO WHILE ( K .LE. N )
239 IF ( IPIV( K ).GT.0 ) THEN
241 IF ( KP .NE. K ) THEN
243 WORK( N+K ) = WORK( N+KP )
250 WORK( N+K ) = WORK( N+KP )
257 DO WHILE ( K .LE. NCOLS )
258 IF ( IPIV( K ).GT.0 ) THEN
261 IF ( KP .NE. K ) THEN
263 WORK( N+K ) = WORK( N+KP )
267 WORK( K ) = MAX( CABS1( AF( I, K ) ), WORK( K ) )
274 WORK( N+K+1 ) = WORK( N+KP )
277 WORK( K ) = MAX( CABS1( AF( I, K ) ), WORK( K ) )
279 $ MAX( CABS1( AF( I, K+1 ) ), WORK( K+1 ) )
281 WORK( K ) = MAX( CABS1( AF( K, K ) ), WORK( K ) )
286 DO WHILE ( K .GE. 1 )
287 IF ( IPIV( K ).GT.0 ) THEN
289 IF ( KP .NE. K ) THEN
291 WORK( N+K ) = WORK( N+KP )
298 WORK( N+K ) = WORK( N+KP )
305 * Compute the *inverse* of the max element growth factor. Dividing
306 * by zero would imply the largest entry of the factor's column is
307 * zero. Than can happen when either the column of A is zero or
308 * massive pivots made the factor underflow to zero. Neither counts
309 * as growth in itself, so simply ignore terms with zero
316 IF ( UMAX /= 0.0D+0 ) THEN
317 RPVGRW = MIN( AMAX / UMAX, RPVGRW )
324 IF ( UMAX /= 0.0D+0 ) THEN
325 RPVGRW = MIN( AMAX / UMAX, RPVGRW )
330 ZLA_SYRPVGRW = RPVGRW