LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
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 "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 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).
[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
September 2012

Definition at line 108 of file dla_porpvgrw.f.

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