1 *> \brief \b DLA_PORPVGRW computes the reciprocal pivot growth factor norm(A)/norm(U) for a symmetric or Hermitian positive-definite matrix.
3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
9 *> Download DLA_PORPVGRW + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dla_porpvgrw.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dla_porpvgrw.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dla_porpvgrw.f">
21 * DOUBLE PRECISION FUNCTION DLA_PORPVGRW( UPLO, NCOLS, A, LDA, AF,
24 * .. Scalar Arguments ..
26 * INTEGER NCOLS, LDA, LDAF
28 * .. Array Arguments ..
29 * DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), WORK( * )
39 *> DLA_PORPVGRW computes the reciprocal pivot growth factor
40 *> norm(A)/norm(U). The "max absolute element" norm is used. If this is
41 *> much less than 1, the stability of the LU factorization of the
42 *> (equilibrated) matrix A could be poor. This also means that the
43 *> solution X, estimated condition numbers, and error bounds could be
52 *> UPLO is CHARACTER*1
53 *> = 'U': Upper triangle of A is stored;
54 *> = 'L': Lower triangle of A is stored.
60 *> The number of columns of the matrix A. NCOLS >= 0.
65 *> A is DOUBLE PRECISION array, dimension (LDA,N)
66 *> On entry, the N-by-N matrix A.
72 *> The leading dimension of the array A. LDA >= max(1,N).
77 *> AF is DOUBLE PRECISION array, dimension (LDAF,N)
78 *> The triangular factor U or L from the Cholesky factorization
79 *> A = U**T*U or A = L*L**T, as computed by DPOTRF.
85 *> The leading dimension of the array AF. LDAF >= max(1,N).
90 *> WORK is DOUBLE PRECISION array, dimension (2*N)
96 *> \author Univ. of Tennessee
97 *> \author Univ. of California Berkeley
98 *> \author Univ. of Colorado Denver
101 *> \date September 2012
103 *> \ingroup doublePOcomputational
105 * =====================================================================
106 DOUBLE PRECISION FUNCTION DLA_PORPVGRW( UPLO, NCOLS, A, LDA, AF,
109 * -- LAPACK computational routine (version 3.4.2) --
110 * -- LAPACK is a software package provided by Univ. of Tennessee, --
111 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
114 * .. Scalar Arguments ..
116 INTEGER NCOLS, LDA, LDAF
118 * .. Array Arguments ..
119 DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), WORK( * )
122 * =====================================================================
124 * .. Local Scalars ..
126 DOUBLE PRECISION AMAX, UMAX, RPVGRW
129 * .. Intrinsic Functions ..
130 INTRINSIC ABS, MAX, MIN
132 * .. External Functions ..
136 * .. Executable Statements ..
138 UPPER = LSAME( 'Upper', UPLO )
140 * DPOTRF will have factored only the NCOLSxNCOLS leading minor, so
141 * we restrict the growth search to that minor and use only the first
142 * 2*NCOLS workspace entries.
149 * Find the max magnitude entry of each column.
155 $ MAX( ABS( A( I, J ) ), WORK( NCOLS+J ) )
162 $ MAX( ABS( A( I, J ) ), WORK( NCOLS+J ) )
167 * Now find the max magnitude entry of each column of the factor in
168 * AF. No pivoting, so no permutations.
170 IF ( LSAME( 'Upper', UPLO ) ) THEN
173 WORK( J ) = MAX( ABS( AF( I, J ) ), WORK( J ) )
179 WORK( J ) = MAX( ABS( AF( I, J ) ), WORK( J ) )
184 * Compute the *inverse* of the max element growth factor. Dividing
185 * by zero would imply the largest entry of the factor's column is
186 * zero. Than can happen when either the column of A is zero or
187 * massive pivots made the factor underflow to zero. Neither counts
188 * as growth in itself, so simply ignore terms with zero
191 IF ( LSAME( 'Upper', UPLO ) ) THEN
194 AMAX = WORK( NCOLS+I )
195 IF ( UMAX /= 0.0D+0 ) THEN
196 RPVGRW = MIN( AMAX / UMAX, RPVGRW )
202 AMAX = WORK( NCOLS+I )
203 IF ( UMAX /= 0.0D+0 ) THEN
204 RPVGRW = MIN( AMAX / UMAX, RPVGRW )
209 DLA_PORPVGRW = RPVGRW