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

◆ dla_porpvgrw()

double precision function dla_porpvgrw ( character*1  UPLO,
integer  NCOLS,
double precision, dimension( lda, * )  A,
integer  LDA,
double precision, dimension( ldaf, * )  AF,
integer  LDAF,
double precision, dimension( * )  WORK 
)

DLA_PORPVGRW computes the reciprocal pivot growth factor norm(A)/norm(U) for a symmetric or Hermitian positive-definite matrix.

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

Purpose:
 DLA_PORPVGRW computes the reciprocal pivot growth factor
 norm(A)/norm(U). The "max absolute element" norm is used. If this is
 much less than 1, the stability of the LU factorization of the
 (equilibrated) matrix A could be poor. This also means that the
 solution X, estimated condition numbers, and error bounds could be
 unreliable.
Parameters
[in]UPLO
          UPLO is CHARACTER*1
       = 'U':  Upper triangle of A is stored;
       = 'L':  Lower triangle of A is stored.
[in]NCOLS
          NCOLS is INTEGER
     The number of columns of the matrix A. NCOLS >= 0.
[in]A
          A is DOUBLE PRECISION array, dimension (LDA,N)
     On entry, the N-by-N matrix A.
[in]LDA
          LDA is INTEGER
     The leading dimension of the array A.  LDA >= max(1,N).
[in]AF
          AF is DOUBLE PRECISION array, dimension (LDAF,N)
     The triangular factor U or L from the Cholesky factorization
     A = U**T*U or A = L*L**T, as computed by DPOTRF.
[in]LDAF
          LDAF is INTEGER
     The leading dimension of the array AF.  LDAF >= max(1,N).
[out]WORK
          WORK is DOUBLE PRECISION array, dimension (2*N)
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.

Definition at line 104 of file dla_porpvgrw.f.

106*
107* -- LAPACK computational routine --
108* -- LAPACK is a software package provided by Univ. of Tennessee, --
109* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
110*
111* .. Scalar Arguments ..
112 CHARACTER*1 UPLO
113 INTEGER NCOLS, LDA, LDAF
114* ..
115* .. Array Arguments ..
116 DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), WORK( * )
117* ..
118*
119* =====================================================================
120*
121* .. Local Scalars ..
122 INTEGER I, J
123 DOUBLE PRECISION AMAX, UMAX, RPVGRW
124 LOGICAL UPPER
125* ..
126* .. Intrinsic Functions ..
127 INTRINSIC abs, max, min
128* ..
129* .. External Functions ..
130 EXTERNAL lsame
131 LOGICAL LSAME
132* ..
133* .. Executable Statements ..
134*
135 upper = lsame( 'Upper', uplo )
136*
137* DPOTRF will have factored only the NCOLSxNCOLS leading minor, so
138* we restrict the growth search to that minor and use only the first
139* 2*NCOLS workspace entries.
140*
141 rpvgrw = 1.0d+0
142 DO i = 1, 2*ncols
143 work( i ) = 0.0d+0
144 END DO
145*
146* Find the max magnitude entry of each column.
147*
148 IF ( upper ) THEN
149 DO j = 1, ncols
150 DO i = 1, j
151 work( ncols+j ) =
152 $ max( abs( a( i, j ) ), work( ncols+j ) )
153 END DO
154 END DO
155 ELSE
156 DO j = 1, ncols
157 DO i = j, ncols
158 work( ncols+j ) =
159 $ max( abs( a( i, j ) ), work( ncols+j ) )
160 END DO
161 END DO
162 END IF
163*
164* Now find the max magnitude entry of each column of the factor in
165* AF. No pivoting, so no permutations.
166*
167 IF ( lsame( 'Upper', uplo ) ) THEN
168 DO j = 1, ncols
169 DO i = 1, j
170 work( j ) = max( abs( af( i, j ) ), work( j ) )
171 END DO
172 END DO
173 ELSE
174 DO j = 1, ncols
175 DO i = j, ncols
176 work( j ) = max( abs( af( i, j ) ), work( j ) )
177 END DO
178 END DO
179 END IF
180*
181* Compute the *inverse* of the max element growth factor. Dividing
182* by zero would imply the largest entry of the factor's column is
183* zero. Than can happen when either the column of A is zero or
184* massive pivots made the factor underflow to zero. Neither counts
185* as growth in itself, so simply ignore terms with zero
186* denominators.
187*
188 IF ( lsame( 'Upper', uplo ) ) THEN
189 DO i = 1, ncols
190 umax = work( i )
191 amax = work( ncols+i )
192 IF ( umax /= 0.0d+0 ) THEN
193 rpvgrw = min( amax / umax, rpvgrw )
194 END IF
195 END DO
196 ELSE
197 DO i = 1, ncols
198 umax = work( i )
199 amax = work( ncols+i )
200 IF ( umax /= 0.0d+0 ) THEN
201 rpvgrw = min( amax / umax, rpvgrw )
202 END IF
203 END DO
204 END IF
205
206 dla_porpvgrw = rpvgrw
207*
208* End of DLA_PORPVGRW
209*
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:53
double precision function dla_porpvgrw(UPLO, NCOLS, A, LDA, AF, LDAF, WORK)
DLA_PORPVGRW computes the reciprocal pivot growth factor norm(A)/norm(U) for a symmetric or Hermitian...
Definition: dla_porpvgrw.f:106
Here is the call graph for this function:
Here is the caller graph for this function: