LAPACK 3.3.1
Linear Algebra PACKage

zla_gbrpvgrw.f

Go to the documentation of this file.
00001       DOUBLE PRECISION FUNCTION ZLA_GBRPVGRW( N, KL, KU, NCOLS, AB,
00002      $                                        LDAB, AFB, LDAFB )
00003 *
00004 *     -- LAPACK routine (version 3.2.2)                                 --
00005 *     -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
00006 *     -- Jason Riedy of Univ. of California Berkeley.                 --
00007 *     -- June 2010                                                    --
00008 *
00009 *     -- LAPACK is a software package provided by Univ. of Tennessee, --
00010 *     -- Univ. of California Berkeley and NAG Ltd.                    --
00011 *
00012       IMPLICIT NONE
00013 *     ..
00014 *     .. Scalar Arguments ..
00015       INTEGER            N, KL, KU, NCOLS, LDAB, LDAFB
00016 *     ..
00017 *     .. Array Arguments ..
00018       COMPLEX*16         AB( LDAB, * ), AFB( LDAFB, * )
00019 *     ..
00020 *
00021 *  Purpose
00022 *  =======
00023 *
00024 *  ZLA_GBRPVGRW computes the reciprocal pivot growth factor
00025 *  norm(A)/norm(U). The "max absolute element" norm is used. If this is
00026 *  much less than 1, the stability of the LU factorization of the
00027 *  (equilibrated) matrix A could be poor. This also means that the
00028 *  solution X, estimated condition numbers, and error bounds could be
00029 *  unreliable.
00030 *
00031 *  Arguments
00032 *  =========
00033 *
00034 *     N       (input) INTEGER
00035 *     The number of linear equations, i.e., the order of the
00036 *     matrix A.  N >= 0.
00037 *
00038 *     KL      (input) INTEGER
00039 *     The number of subdiagonals within the band of A.  KL >= 0.
00040 *
00041 *     KU      (input) INTEGER
00042 *     The number of superdiagonals within the band of A.  KU >= 0.
00043 *
00044 *     NCOLS   (input) INTEGER
00045 *     The number of columns of the matrix A.  NCOLS >= 0.
00046 *
00047 *     AB      (input) COMPLEX*16 array, dimension (LDAB,N)
00048 *     On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
00049 *     The j-th column of A is stored in the j-th column of the
00050 *     array AB as follows:
00051 *     AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
00052 *
00053 *     LDAB    (input) INTEGER
00054 *     The leading dimension of the array AB.  LDAB >= KL+KU+1.
00055 *
00056 *     AFB     (input) COMPLEX*16 array, dimension (LDAFB,N)
00057 *     Details of the LU factorization of the band matrix A, as
00058 *     computed by ZGBTRF.  U is stored as an upper triangular
00059 *     band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
00060 *     and the multipliers used during the factorization are stored
00061 *     in rows KL+KU+2 to 2*KL+KU+1.
00062 *
00063 *     LDAFB   (input) INTEGER
00064 *     The leading dimension of the array AFB.  LDAFB >= 2*KL+KU+1.
00065 *
00066 *  =====================================================================
00067 *
00068 *     .. Local Scalars ..
00069       INTEGER            I, J, KD
00070       DOUBLE PRECISION   AMAX, UMAX, RPVGRW
00071       COMPLEX*16         ZDUM
00072 *     ..
00073 *     .. Intrinsic Functions ..
00074       INTRINSIC          ABS, MAX, MIN, REAL, DIMAG
00075 *     ..
00076 *     .. Statement Functions ..
00077       DOUBLE PRECISION   CABS1
00078 *     ..
00079 *     .. Statement Function Definitions ..
00080       CABS1( ZDUM ) = ABS( DBLE( ZDUM ) ) + ABS( DIMAG( ZDUM ) )
00081 *     ..
00082 *     .. Executable Statements ..
00083 *
00084       RPVGRW = 1.0D+0
00085 
00086       KD = KU + 1
00087       DO J = 1, NCOLS
00088          AMAX = 0.0D+0
00089          UMAX = 0.0D+0
00090          DO I = MAX( J-KU, 1 ), MIN( J+KL, N )
00091             AMAX = MAX( CABS1( AB( KD+I-J, J ) ), AMAX )
00092          END DO
00093          DO I = MAX( J-KU, 1 ), J
00094             UMAX = MAX( CABS1( AFB( KD+I-J, J ) ), UMAX )
00095          END DO
00096          IF ( UMAX /= 0.0D+0 ) THEN
00097             RPVGRW = MIN( AMAX / UMAX, RPVGRW )
00098          END IF
00099       END DO
00100       ZLA_GBRPVGRW = RPVGRW
00101       END
 All Files Functions