LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
double precision function zla_porpvgrw ( character*1  UPLO,
integer  NCOLS,
complex*16, dimension( lda, * )  A,
integer  LDA,
complex*16, dimension( ldaf, * )  AF,
integer  LDAF,
double precision, dimension( * )  WORK 
)

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

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

Purpose:
 ZLA_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*16 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*16 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 ZPOTRF.
[in]LDAF
          LDAF is INTEGER
     The leading dimension of the array AF.  LDAF >= max(1,N).
[in]WORK
          WORK is DOUBLE PRECISION array, dimension (2*N)
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
June 2016

Definition at line 109 of file zla_porpvgrw.f.

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