LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
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 "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).
[in]WORK
          WORK is REAL array, dimension (2*N)
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
June 2016

Definition at line 107 of file cla_porpvgrw.f.

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

Here is the call graph for this function:

Here is the caller graph for this function: