LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
real function sla_porpvgrw ( character*1  UPLO,
integer  NCOLS,
real, dimension( lda, * )  A,
integer  LDA,
real, dimension( ldaf, * )  AF,
integer  LDAF,
real, dimension( * )  WORK 
)

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

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

Purpose:
 SLA_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 REAL 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 REAL 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 SPOTRF.
[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
September 2012

Definition at line 106 of file sla_porpvgrw.f.

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