![]() |
LAPACK
3.4.1
LAPACK: Linear Algebra PACKage
|
00001 *> \brief \b ZLA_GBRPVGRW 00002 * 00003 * =========== DOCUMENTATION =========== 00004 * 00005 * Online html documentation available at 00006 * http://www.netlib.org/lapack/explore-html/ 00007 * 00008 *> \htmlonly 00009 *> Download ZLA_GBRPVGRW + dependencies 00010 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zla_gbrpvgrw.f"> 00011 *> [TGZ]</a> 00012 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zla_gbrpvgrw.f"> 00013 *> [ZIP]</a> 00014 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zla_gbrpvgrw.f"> 00015 *> [TXT]</a> 00016 *> \endhtmlonly 00017 * 00018 * Definition: 00019 * =========== 00020 * 00021 * DOUBLE PRECISION FUNCTION ZLA_GBRPVGRW( N, KL, KU, NCOLS, AB, 00022 * LDAB, AFB, LDAFB ) 00023 * 00024 * .. Scalar Arguments .. 00025 * INTEGER N, KL, KU, NCOLS, LDAB, LDAFB 00026 * .. 00027 * .. Array Arguments .. 00028 * COMPLEX*16 AB( LDAB, * ), AFB( LDAFB, * ) 00029 * .. 00030 * 00031 * 00032 *> \par Purpose: 00033 * ============= 00034 *> 00035 *> \verbatim 00036 *> 00037 *> ZLA_GBRPVGRW computes the reciprocal pivot growth factor 00038 *> norm(A)/norm(U). The "max absolute element" norm is used. If this is 00039 *> much less than 1, the stability of the LU factorization of the 00040 *> (equilibrated) matrix A could be poor. This also means that the 00041 *> solution X, estimated condition numbers, and error bounds could be 00042 *> unreliable. 00043 *> \endverbatim 00044 * 00045 * Arguments: 00046 * ========== 00047 * 00048 *> \param[in] N 00049 *> \verbatim 00050 *> N is INTEGER 00051 *> The number of linear equations, i.e., the order of the 00052 *> matrix A. N >= 0. 00053 *> \endverbatim 00054 *> 00055 *> \param[in] KL 00056 *> \verbatim 00057 *> KL is INTEGER 00058 *> The number of subdiagonals within the band of A. KL >= 0. 00059 *> \endverbatim 00060 *> 00061 *> \param[in] KU 00062 *> \verbatim 00063 *> KU is INTEGER 00064 *> The number of superdiagonals within the band of A. KU >= 0. 00065 *> \endverbatim 00066 *> 00067 *> \param[in] NCOLS 00068 *> \verbatim 00069 *> NCOLS is INTEGER 00070 *> The number of columns of the matrix A. NCOLS >= 0. 00071 *> \endverbatim 00072 *> 00073 *> \param[in] AB 00074 *> \verbatim 00075 *> AB is COMPLEX*16 array, dimension (LDAB,N) 00076 *> On entry, the matrix A in band storage, in rows 1 to KL+KU+1. 00077 *> The j-th column of A is stored in the j-th column of the 00078 *> array AB as follows: 00079 *> AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl) 00080 *> \endverbatim 00081 *> 00082 *> \param[in] LDAB 00083 *> \verbatim 00084 *> LDAB is INTEGER 00085 *> The leading dimension of the array AB. LDAB >= KL+KU+1. 00086 *> \endverbatim 00087 *> 00088 *> \param[in] AFB 00089 *> \verbatim 00090 *> AFB is COMPLEX*16 array, dimension (LDAFB,N) 00091 *> Details of the LU factorization of the band matrix A, as 00092 *> computed by ZGBTRF. U is stored as an upper triangular 00093 *> band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, 00094 *> and the multipliers used during the factorization are stored 00095 *> in rows KL+KU+2 to 2*KL+KU+1. 00096 *> \endverbatim 00097 *> 00098 *> \param[in] LDAFB 00099 *> \verbatim 00100 *> LDAFB is INTEGER 00101 *> The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1. 00102 *> \endverbatim 00103 * 00104 * Authors: 00105 * ======== 00106 * 00107 *> \author Univ. of Tennessee 00108 *> \author Univ. of California Berkeley 00109 *> \author Univ. of Colorado Denver 00110 *> \author NAG Ltd. 00111 * 00112 *> \date November 2011 00113 * 00114 *> \ingroup complex16GBcomputational 00115 * 00116 * ===================================================================== 00117 DOUBLE PRECISION FUNCTION ZLA_GBRPVGRW( N, KL, KU, NCOLS, AB, 00118 $ LDAB, AFB, LDAFB ) 00119 * 00120 * -- LAPACK computational routine (version 3.4.0) -- 00121 * -- LAPACK is a software package provided by Univ. of Tennessee, -- 00122 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 00123 * November 2011 00124 * 00125 * .. Scalar Arguments .. 00126 INTEGER N, KL, KU, NCOLS, LDAB, LDAFB 00127 * .. 00128 * .. Array Arguments .. 00129 COMPLEX*16 AB( LDAB, * ), AFB( LDAFB, * ) 00130 * .. 00131 * 00132 * ===================================================================== 00133 * 00134 * .. Local Scalars .. 00135 INTEGER I, J, KD 00136 DOUBLE PRECISION AMAX, UMAX, RPVGRW 00137 COMPLEX*16 ZDUM 00138 * .. 00139 * .. Intrinsic Functions .. 00140 INTRINSIC ABS, MAX, MIN, REAL, DIMAG 00141 * .. 00142 * .. Statement Functions .. 00143 DOUBLE PRECISION CABS1 00144 * .. 00145 * .. Statement Function Definitions .. 00146 CABS1( ZDUM ) = ABS( DBLE( ZDUM ) ) + ABS( DIMAG( ZDUM ) ) 00147 * .. 00148 * .. Executable Statements .. 00149 * 00150 RPVGRW = 1.0D+0 00151 00152 KD = KU + 1 00153 DO J = 1, NCOLS 00154 AMAX = 0.0D+0 00155 UMAX = 0.0D+0 00156 DO I = MAX( J-KU, 1 ), MIN( J+KL, N ) 00157 AMAX = MAX( CABS1( AB( KD+I-J, J ) ), AMAX ) 00158 END DO 00159 DO I = MAX( J-KU, 1 ), J 00160 UMAX = MAX( CABS1( AFB( KD+I-J, J ) ), UMAX ) 00161 END DO 00162 IF ( UMAX /= 0.0D+0 ) THEN 00163 RPVGRW = MIN( AMAX / UMAX, RPVGRW ) 00164 END IF 00165 END DO 00166 ZLA_GBRPVGRW = RPVGRW 00167 END