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

◆ cla_porpvgrw()

real function cla_porpvgrw ( character*1 uplo,
integer ncols,
complex, dimension( lda, * ) a,
integer lda,
complex, dimension( ldaf, * ) af,
integer ldaf,
real, dimension( * ) work )

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

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

Purpose:
!>
!>
!> CLA_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 COMPLEX 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 COMPLEX 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 CPOTRF.
!> 
[in]LDAF
!>          LDAF is INTEGER
!>     The leading dimension of the array AF.  LDAF >= max(1,N).
!> 
[out]WORK
!>          WORK is REAL array, dimension (2*N)
!> 
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.

Definition at line 102 of file cla_porpvgrw.f.

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