 LAPACK  3.10.0 LAPACK: Linear Algebra PACKage

◆ 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.

Purpose:
CLA_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 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)

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