LAPACK 3.12.1
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
cla_gbrpvgrw.f
Go to the documentation of this file.
1*> \brief \b CLA_GBRPVGRW computes the reciprocal pivot growth factor norm(A)/norm(U) for a general banded matrix.
2*
3* =========== DOCUMENTATION ===========
4*
5* Online html documentation available at
6* http://www.netlib.org/lapack/explore-html/
7*
8*> Download CLA_GBRPVGRW + dependencies
9*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/cla_gbrpvgrw.f">
10*> [TGZ]</a>
11*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/cla_gbrpvgrw.f">
12*> [ZIP]</a>
13*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/cla_gbrpvgrw.f">
14*> [TXT]</a>
15*
16* Definition:
17* ===========
18*
19* REAL FUNCTION CLA_GBRPVGRW( N, KL, KU, NCOLS, AB, LDAB, AFB,
20* LDAFB )
21*
22* .. Scalar Arguments ..
23* INTEGER N, KL, KU, NCOLS, LDAB, LDAFB
24* ..
25* .. Array Arguments ..
26* COMPLEX AB( LDAB, * ), AFB( LDAFB, * )
27* ..
28*
29*
30*> \par Purpose:
31* =============
32*>
33*> \verbatim
34*>
35*> CLA_GBRPVGRW computes the reciprocal pivot growth factor
36*> norm(A)/norm(U). The "max absolute element" norm is used. If this is
37*> much less than 1, the stability of the LU factorization of the
38*> (equilibrated) matrix A could be poor. This also means that the
39*> solution X, estimated condition numbers, and error bounds could be
40*> unreliable.
41*> \endverbatim
42*
43* Arguments:
44* ==========
45*
46*> \param[in] N
47*> \verbatim
48*> N is INTEGER
49*> The number of linear equations, i.e., the order of the
50*> matrix A. N >= 0.
51*> \endverbatim
52*>
53*> \param[in] KL
54*> \verbatim
55*> KL is INTEGER
56*> The number of subdiagonals within the band of A. KL >= 0.
57*> \endverbatim
58*>
59*> \param[in] KU
60*> \verbatim
61*> KU is INTEGER
62*> The number of superdiagonals within the band of A. KU >= 0.
63*> \endverbatim
64*>
65*> \param[in] NCOLS
66*> \verbatim
67*> NCOLS is INTEGER
68*> The number of columns of the matrix A. NCOLS >= 0.
69*> \endverbatim
70*>
71*> \param[in] AB
72*> \verbatim
73*> AB is COMPLEX array, dimension (LDAB,N)
74*> On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
75*> The j-th column of A is stored in the j-th column of the
76*> array AB as follows:
77*> AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
78*> \endverbatim
79*>
80*> \param[in] LDAB
81*> \verbatim
82*> LDAB is INTEGER
83*> The leading dimension of the array AB. LDAB >= KL+KU+1.
84*> \endverbatim
85*>
86*> \param[in] AFB
87*> \verbatim
88*> AFB is COMPLEX array, dimension (LDAFB,N)
89*> Details of the LU factorization of the band matrix A, as
90*> computed by CGBTRF. U is stored as an upper triangular
91*> band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
92*> and the multipliers used during the factorization are stored
93*> in rows KL+KU+2 to 2*KL+KU+1.
94*> \endverbatim
95*>
96*> \param[in] LDAFB
97*> \verbatim
98*> LDAFB is INTEGER
99*> The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
100*> \endverbatim
101*
102* Authors:
103* ========
104*
105*> \author Univ. of Tennessee
106*> \author Univ. of California Berkeley
107*> \author Univ. of Colorado Denver
108*> \author NAG Ltd.
109*
110*> \ingroup la_gbrpvgrw
111*
112* =====================================================================
113 REAL function cla_gbrpvgrw( n, kl, ku, ncols, ab, ldab, afb,
114 $ ldafb )
115*
116* -- LAPACK computational routine --
117* -- LAPACK is a software package provided by Univ. of Tennessee, --
118* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
119*
120* .. Scalar Arguments ..
121 INTEGER n, kl, ku, ncols, ldab, ldafb
122* ..
123* .. Array Arguments ..
124 COMPLEX ab( ldab, * ), afb( ldafb, * )
125* ..
126*
127* =====================================================================
128*
129* .. Local Scalars ..
130 INTEGER i, j, kd
131 REAL amax, umax, rpvgrw
132 COMPLEX zdum
133* ..
134* .. Intrinsic Functions ..
135 INTRINSIC abs, max, min, real, aimag
136* ..
137* .. Statement Functions ..
138 REAL cabs1
139* ..
140* .. Statement Function Definitions ..
141 cabs1( zdum ) = abs( real( zdum ) ) + abs( aimag( zdum ) )
142* ..
143* .. Executable Statements ..
144*
145 rpvgrw = 1.0
146
147 kd = ku + 1
148 DO j = 1, ncols
149 amax = 0.0
150 umax = 0.0
151 DO i = max( j-ku, 1 ), min( j+kl, n )
152 amax = max( cabs1( ab( kd+i-j, j ) ), amax )
153 END DO
154 DO i = max( j-ku, 1 ), j
155 umax = max( cabs1( afb( kd+i-j, j ) ), umax )
156 END DO
157 IF ( umax /= 0.0 ) THEN
158 rpvgrw = min( amax / umax, rpvgrw )
159 END IF
160 END DO
161 cla_gbrpvgrw = rpvgrw
162*
163* End of CLA_GBRPVGRW
164*
165 END
real function cla_gbrpvgrw(n, kl, ku, ncols, ab, ldab, afb, ldafb)
CLA_GBRPVGRW computes the reciprocal pivot growth factor norm(A)/norm(U) for a general banded matrix.