LAPACK 3.12.1
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
dla_gbrpvgrw.f
Go to the documentation of this file.
1*> \brief \b DLA_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 DLA_GBRPVGRW + dependencies
9*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dla_gbrpvgrw.f">
10*> [TGZ]</a>
11*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dla_gbrpvgrw.f">
12*> [ZIP]</a>
13*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dla_gbrpvgrw.f">
14*> [TXT]</a>
15*
16* Definition:
17* ===========
18*
19* DOUBLE PRECISION FUNCTION DLA_GBRPVGRW( N, KL, KU, NCOLS, AB,
20* LDAB, AFB, LDAFB )
21*
22* .. Scalar Arguments ..
23* INTEGER N, KL, KU, NCOLS, LDAB, LDAFB
24* ..
25* .. Array Arguments ..
26* DOUBLE PRECISION AB( LDAB, * ), AFB( LDAFB, * )
27* ..
28*
29*
30*> \par Purpose:
31* =============
32*>
33*> \verbatim
34*>
35*> DLA_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 DOUBLE PRECISION 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 DOUBLE PRECISION array, dimension (LDAFB,N)
89*> Details of the LU factorization of the band matrix A, as
90*> computed by DGBTRF. 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 DOUBLE PRECISION FUNCTION dla_gbrpvgrw( N, KL, KU, NCOLS, AB,
114 $ LDAB, AFB, 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 DOUBLE PRECISION ab( ldab, * ), afb( ldafb, * )
125* ..
126*
127* =====================================================================
128*
129* .. Local Scalars ..
130 INTEGER i, j, kd
131 DOUBLE PRECISION amax, umax, rpvgrw
132* ..
133* .. Intrinsic Functions ..
134 INTRINSIC abs, max, min
135* ..
136* .. Executable Statements ..
137*
138 rpvgrw = 1.0d+0
139
140 kd = ku + 1
141 DO j = 1, ncols
142 amax = 0.0d+0
143 umax = 0.0d+0
144 DO i = max( j-ku, 1 ), min( j+kl, n )
145 amax = max( abs( ab( kd+i-j, j)), amax )
146 END DO
147 DO i = max( j-ku, 1 ), j
148 umax = max( abs( afb( kd+i-j, j ) ), umax )
149 END DO
150 IF ( umax /= 0.0d+0 ) THEN
151 rpvgrw = min( amax / umax, rpvgrw )
152 END IF
153 END DO
154 dla_gbrpvgrw = rpvgrw
155*
156* End of DLA_GBRPVGRW
157*
158 END
double precision function dla_gbrpvgrw(n, kl, ku, ncols, ab, ldab, afb, ldafb)
DLA_GBRPVGRW computes the reciprocal pivot growth factor norm(A)/norm(U) for a general banded matrix.