LAPACK 3.12.1
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  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 102 of file dla_porpvgrw.f.

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