LAPACK 3.12.1
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
dgbsvx.f
Go to the documentation of this file.
1*> \brief <b> DGBSVX computes the solution to system of linear equations A * X = B for GB matrices</b>
2*
3* =========== DOCUMENTATION ===========
4*
5* Online html documentation available at
6* http://www.netlib.org/lapack/explore-html/
7*
8*> Download DGBSVX + dependencies
9*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgbsvx.f">
10*> [TGZ]</a>
11*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgbsvx.f">
12*> [ZIP]</a>
13*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgbsvx.f">
14*> [TXT]</a>
15*
16* Definition:
17* ===========
18*
19* SUBROUTINE DGBSVX( FACT, TRANS, N, KL, KU, NRHS, AB, LDAB, AFB,
20* LDAFB, IPIV, EQUED, R, C, B, LDB, X, LDX,
21* RCOND, FERR, BERR, WORK, IWORK, INFO )
22*
23* .. Scalar Arguments ..
24* CHARACTER EQUED, FACT, TRANS
25* INTEGER INFO, KL, KU, LDAB, LDAFB, LDB, LDX, N, NRHS
26* DOUBLE PRECISION RCOND
27* ..
28* .. Array Arguments ..
29* INTEGER IPIV( * ), IWORK( * )
30* DOUBLE PRECISION AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
31* $ BERR( * ), C( * ), FERR( * ), R( * ),
32* $ WORK( * ), X( LDX, * )
33* ..
34*
35*
36*> \par Purpose:
37* =============
38*>
39*> \verbatim
40*>
41*> DGBSVX uses the LU factorization to compute the solution to a real
42*> system of linear equations A * X = B, A**T * X = B, or A**H * X = B,
43*> where A is a band matrix of order N with KL subdiagonals and KU
44*> superdiagonals, and X and B are N-by-NRHS matrices.
45*>
46*> Error bounds on the solution and a condition estimate are also
47*> provided.
48*> \endverbatim
49*
50*> \par Description:
51* =================
52*>
53*> \verbatim
54*>
55*> The following steps are performed by this subroutine:
56*>
57*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
58*> the system:
59*> TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
60*> TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
61*> TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
62*> Whether or not the system will be equilibrated depends on the
63*> scaling of the matrix A, but if equilibration is used, A is
64*> overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
65*> or diag(C)*B (if TRANS = 'T' or 'C').
66*>
67*> 2. If FACT = 'N' or 'E', the LU decomposition is used to factor the
68*> matrix A (after equilibration if FACT = 'E') as
69*> A = L * U,
70*> where L is a product of permutation and unit lower triangular
71*> matrices with KL subdiagonals, and U is upper triangular with
72*> KL+KU superdiagonals.
73*>
74*> 3. If some U(i,i)=0, so that U is exactly singular, then the routine
75*> returns with INFO = i. Otherwise, the factored form of A is used
76*> to estimate the condition number of the matrix A. If the
77*> reciprocal of the condition number is less than machine precision,
78*> INFO = N+1 is returned as a warning, but the routine still goes on
79*> to solve for X and compute error bounds as described below.
80*>
81*> 4. The system of equations is solved for X using the factored form
82*> of A.
83*>
84*> 5. Iterative refinement is applied to improve the computed solution
85*> matrix and calculate error bounds and backward error estimates
86*> for it.
87*>
88*> 6. If equilibration was used, the matrix X is premultiplied by
89*> diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
90*> that it solves the original system before equilibration.
91*> \endverbatim
92*
93* Arguments:
94* ==========
95*
96*> \param[in] FACT
97*> \verbatim
98*> FACT is CHARACTER*1
99*> Specifies whether or not the factored form of the matrix A is
100*> supplied on entry, and if not, whether the matrix A should be
101*> equilibrated before it is factored.
102*> = 'F': On entry, AFB and IPIV contain the factored form of
103*> A. If EQUED is not 'N', the matrix A has been
104*> equilibrated with scaling factors given by R and C.
105*> AB, AFB, and IPIV are not modified.
106*> = 'N': The matrix A will be copied to AFB and factored.
107*> = 'E': The matrix A will be equilibrated if necessary, then
108*> copied to AFB and factored.
109*> \endverbatim
110*>
111*> \param[in] TRANS
112*> \verbatim
113*> TRANS is CHARACTER*1
114*> Specifies the form of the system of equations.
115*> = 'N': A * X = B (No transpose)
116*> = 'T': A**T * X = B (Transpose)
117*> = 'C': A**H * X = B (Transpose)
118*> \endverbatim
119*>
120*> \param[in] N
121*> \verbatim
122*> N is INTEGER
123*> The number of linear equations, i.e., the order of the
124*> matrix A. N >= 0.
125*> \endverbatim
126*>
127*> \param[in] KL
128*> \verbatim
129*> KL is INTEGER
130*> The number of subdiagonals within the band of A. KL >= 0.
131*> \endverbatim
132*>
133*> \param[in] KU
134*> \verbatim
135*> KU is INTEGER
136*> The number of superdiagonals within the band of A. KU >= 0.
137*> \endverbatim
138*>
139*> \param[in] NRHS
140*> \verbatim
141*> NRHS is INTEGER
142*> The number of right hand sides, i.e., the number of columns
143*> of the matrices B and X. NRHS >= 0.
144*> \endverbatim
145*>
146*> \param[in,out] AB
147*> \verbatim
148*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
149*> On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
150*> The j-th column of A is stored in the j-th column of the
151*> array AB as follows:
152*> AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
153*>
154*> If FACT = 'F' and EQUED is not 'N', then A must have been
155*> equilibrated by the scaling factors in R and/or C. AB is not
156*> modified if FACT = 'F' or 'N', or if FACT = 'E' and
157*> EQUED = 'N' on exit.
158*>
159*> On exit, if EQUED .ne. 'N', A is scaled as follows:
160*> EQUED = 'R': A := diag(R) * A
161*> EQUED = 'C': A := A * diag(C)
162*> EQUED = 'B': A := diag(R) * A * diag(C).
163*> \endverbatim
164*>
165*> \param[in] LDAB
166*> \verbatim
167*> LDAB is INTEGER
168*> The leading dimension of the array AB. LDAB >= KL+KU+1.
169*> \endverbatim
170*>
171*> \param[in,out] AFB
172*> \verbatim
173*> AFB is DOUBLE PRECISION array, dimension (LDAFB,N)
174*> If FACT = 'F', then AFB is an input argument and on entry
175*> contains details of the LU factorization of the band matrix
176*> A, as computed by DGBTRF. U is stored as an upper triangular
177*> band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
178*> and the multipliers used during the factorization are stored
179*> in rows KL+KU+2 to 2*KL+KU+1. If EQUED .ne. 'N', then AFB is
180*> the factored form of the equilibrated matrix A.
181*>
182*> If FACT = 'N', then AFB is an output argument and on exit
183*> returns details of the LU factorization of A.
184*>
185*> If FACT = 'E', then AFB is an output argument and on exit
186*> returns details of the LU factorization of the equilibrated
187*> matrix A (see the description of AB for the form of the
188*> equilibrated matrix).
189*> \endverbatim
190*>
191*> \param[in] LDAFB
192*> \verbatim
193*> LDAFB is INTEGER
194*> The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
195*> \endverbatim
196*>
197*> \param[in,out] IPIV
198*> \verbatim
199*> IPIV is INTEGER array, dimension (N)
200*> If FACT = 'F', then IPIV is an input argument and on entry
201*> contains the pivot indices from the factorization A = L*U
202*> as computed by DGBTRF; row i of the matrix was interchanged
203*> with row IPIV(i).
204*>
205*> If FACT = 'N', then IPIV is an output argument and on exit
206*> contains the pivot indices from the factorization A = L*U
207*> of the original matrix A.
208*>
209*> If FACT = 'E', then IPIV is an output argument and on exit
210*> contains the pivot indices from the factorization A = L*U
211*> of the equilibrated matrix A.
212*> \endverbatim
213*>
214*> \param[in,out] EQUED
215*> \verbatim
216*> EQUED is CHARACTER*1
217*> Specifies the form of equilibration that was done.
218*> = 'N': No equilibration (always true if FACT = 'N').
219*> = 'R': Row equilibration, i.e., A has been premultiplied by
220*> diag(R).
221*> = 'C': Column equilibration, i.e., A has been postmultiplied
222*> by diag(C).
223*> = 'B': Both row and column equilibration, i.e., A has been
224*> replaced by diag(R) * A * diag(C).
225*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
226*> output argument.
227*> \endverbatim
228*>
229*> \param[in,out] R
230*> \verbatim
231*> R is DOUBLE PRECISION array, dimension (N)
232*> The row scale factors for A. If EQUED = 'R' or 'B', A is
233*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
234*> is not accessed. R is an input argument if FACT = 'F';
235*> otherwise, R is an output argument. If FACT = 'F' and
236*> EQUED = 'R' or 'B', each element of R must be positive.
237*> \endverbatim
238*>
239*> \param[in,out] C
240*> \verbatim
241*> C is DOUBLE PRECISION array, dimension (N)
242*> The column scale factors for A. If EQUED = 'C' or 'B', A is
243*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
244*> is not accessed. C is an input argument if FACT = 'F';
245*> otherwise, C is an output argument. If FACT = 'F' and
246*> EQUED = 'C' or 'B', each element of C must be positive.
247*> \endverbatim
248*>
249*> \param[in,out] B
250*> \verbatim
251*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
252*> On entry, the right hand side matrix B.
253*> On exit,
254*> if EQUED = 'N', B is not modified;
255*> if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
256*> diag(R)*B;
257*> if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
258*> overwritten by diag(C)*B.
259*> \endverbatim
260*>
261*> \param[in] LDB
262*> \verbatim
263*> LDB is INTEGER
264*> The leading dimension of the array B. LDB >= max(1,N).
265*> \endverbatim
266*>
267*> \param[out] X
268*> \verbatim
269*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
270*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X
271*> to the original system of equations. Note that A and B are
272*> modified on exit if EQUED .ne. 'N', and the solution to the
273*> equilibrated system is inv(diag(C))*X if TRANS = 'N' and
274*> EQUED = 'C' or 'B', or inv(diag(R))*X if TRANS = 'T' or 'C'
275*> and EQUED = 'R' or 'B'.
276*> \endverbatim
277*>
278*> \param[in] LDX
279*> \verbatim
280*> LDX is INTEGER
281*> The leading dimension of the array X. LDX >= max(1,N).
282*> \endverbatim
283*>
284*> \param[out] RCOND
285*> \verbatim
286*> RCOND is DOUBLE PRECISION
287*> The estimate of the reciprocal condition number of the matrix
288*> A after equilibration (if done). If RCOND is less than the
289*> machine precision (in particular, if RCOND = 0), the matrix
290*> is singular to working precision. This condition is
291*> indicated by a return code of INFO > 0.
292*> \endverbatim
293*>
294*> \param[out] FERR
295*> \verbatim
296*> FERR is DOUBLE PRECISION array, dimension (NRHS)
297*> The estimated forward error bound for each solution vector
298*> X(j) (the j-th column of the solution matrix X).
299*> If XTRUE is the true solution corresponding to X(j), FERR(j)
300*> is an estimated upper bound for the magnitude of the largest
301*> element in (X(j) - XTRUE) divided by the magnitude of the
302*> largest element in X(j). The estimate is as reliable as
303*> the estimate for RCOND, and is almost always a slight
304*> overestimate of the true error.
305*> \endverbatim
306*>
307*> \param[out] BERR
308*> \verbatim
309*> BERR is DOUBLE PRECISION array, dimension (NRHS)
310*> The componentwise relative backward error of each solution
311*> vector X(j) (i.e., the smallest relative change in
312*> any element of A or B that makes X(j) an exact solution).
313*> \endverbatim
314*>
315*> \param[out] WORK
316*> \verbatim
317*> WORK is DOUBLE PRECISION array, dimension (MAX(1,3*N))
318*> On exit, WORK(1) contains the reciprocal pivot growth
319*> factor norm(A)/norm(U). The "max absolute element" norm is
320*> used. If WORK(1) is much less than 1, then the stability
321*> of the LU factorization of the (equilibrated) matrix A
322*> could be poor. This also means that the solution X, condition
323*> estimator RCOND, and forward error bound FERR could be
324*> unreliable. If factorization fails with 0<INFO<=N, then
325*> WORK(1) contains the reciprocal pivot growth factor for the
326*> leading INFO columns of A.
327*> \endverbatim
328*>
329*> \param[out] IWORK
330*> \verbatim
331*> IWORK is INTEGER array, dimension (N)
332*> \endverbatim
333*>
334*> \param[out] INFO
335*> \verbatim
336*> INFO is INTEGER
337*> = 0: successful exit
338*> < 0: if INFO = -i, the i-th argument had an illegal value
339*> > 0: if INFO = i, and i is
340*> <= N: U(i,i) is exactly zero. The factorization
341*> has been completed, but the factor U is exactly
342*> singular, so the solution and error bounds
343*> could not be computed. RCOND = 0 is returned.
344*> = N+1: U is nonsingular, but RCOND is less than machine
345*> precision, meaning that the matrix is singular
346*> to working precision. Nevertheless, the
347*> solution and error bounds are computed because
348*> there are a number of situations where the
349*> computed solution can be more accurate than the
350*> value of RCOND would suggest.
351*> \endverbatim
352*
353* Authors:
354* ========
355*
356*> \author Univ. of Tennessee
357*> \author Univ. of California Berkeley
358*> \author Univ. of Colorado Denver
359*> \author NAG Ltd.
360*
361*> \ingroup gbsvx
362*
363* =====================================================================
364 SUBROUTINE dgbsvx( FACT, TRANS, N, KL, KU, NRHS, AB, LDAB, AFB,
365 $ LDAFB, IPIV, EQUED, R, C, B, LDB, X, LDX,
366 $ RCOND, FERR, BERR, WORK, IWORK, INFO )
367*
368* -- LAPACK driver routine --
369* -- LAPACK is a software package provided by Univ. of Tennessee, --
370* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
371*
372* .. Scalar Arguments ..
373 CHARACTER EQUED, FACT, TRANS
374 INTEGER INFO, KL, KU, LDAB, LDAFB, LDB, LDX, N, NRHS
375 DOUBLE PRECISION RCOND
376* ..
377* .. Array Arguments ..
378 INTEGER IPIV( * ), IWORK( * )
379 DOUBLE PRECISION AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
380 $ berr( * ), c( * ), ferr( * ), r( * ),
381 $ work( * ), x( ldx, * )
382* ..
383*
384* =====================================================================
385*
386* .. Parameters ..
387 DOUBLE PRECISION ZERO, ONE
388 PARAMETER ( ZERO = 0.0d+0, one = 1.0d+0 )
389* ..
390* .. Local Scalars ..
391 LOGICAL COLEQU, EQUIL, NOFACT, NOTRAN, ROWEQU
392 CHARACTER NORM
393 INTEGER I, INFEQU, J, J1, J2
394 DOUBLE PRECISION AMAX, ANORM, BIGNUM, COLCND, RCMAX, RCMIN,
395 $ rowcnd, rpvgrw, smlnum
396* ..
397* .. External Functions ..
398 LOGICAL LSAME
399 DOUBLE PRECISION DLAMCH, DLANGB, DLANTB
400 EXTERNAL lsame, dlamch, dlangb, dlantb
401* ..
402* .. External Subroutines ..
403 EXTERNAL dcopy, dgbcon, dgbequ, dgbrfs, dgbtrf,
404 $ dgbtrs,
406* ..
407* .. Intrinsic Functions ..
408 INTRINSIC abs, max, min
409* ..
410* .. Executable Statements ..
411*
412 info = 0
413 nofact = lsame( fact, 'N' )
414 equil = lsame( fact, 'E' )
415 notran = lsame( trans, 'N' )
416 IF( nofact .OR. equil ) THEN
417 equed = 'N'
418 rowequ = .false.
419 colequ = .false.
420 ELSE
421 rowequ = lsame( equed, 'R' ) .OR. lsame( equed, 'B' )
422 colequ = lsame( equed, 'C' ) .OR. lsame( equed, 'B' )
423 smlnum = dlamch( 'Safe minimum' )
424 bignum = one / smlnum
425 END IF
426*
427* Test the input parameters.
428*
429 IF( .NOT.nofact .AND.
430 $ .NOT.equil .AND.
431 $ .NOT.lsame( fact, 'F' ) )
432 $ THEN
433 info = -1
434 ELSE IF( .NOT.notran .AND. .NOT.lsame( trans, 'T' ) .AND. .NOT.
435 $ lsame( trans, 'C' ) ) THEN
436 info = -2
437 ELSE IF( n.LT.0 ) THEN
438 info = -3
439 ELSE IF( kl.LT.0 ) THEN
440 info = -4
441 ELSE IF( ku.LT.0 ) THEN
442 info = -5
443 ELSE IF( nrhs.LT.0 ) THEN
444 info = -6
445 ELSE IF( ldab.LT.kl+ku+1 ) THEN
446 info = -8
447 ELSE IF( ldafb.LT.2*kl+ku+1 ) THEN
448 info = -10
449 ELSE IF( lsame( fact, 'F' ) .AND. .NOT.
450 $ ( rowequ .OR. colequ .OR. lsame( equed, 'N' ) ) ) THEN
451 info = -12
452 ELSE
453 IF( rowequ ) THEN
454 rcmin = bignum
455 rcmax = zero
456 DO 10 j = 1, n
457 rcmin = min( rcmin, r( j ) )
458 rcmax = max( rcmax, r( j ) )
459 10 CONTINUE
460 IF( rcmin.LE.zero ) THEN
461 info = -13
462 ELSE IF( n.GT.0 ) THEN
463 rowcnd = max( rcmin, smlnum ) / min( rcmax, bignum )
464 ELSE
465 rowcnd = one
466 END IF
467 END IF
468 IF( colequ .AND. info.EQ.0 ) THEN
469 rcmin = bignum
470 rcmax = zero
471 DO 20 j = 1, n
472 rcmin = min( rcmin, c( j ) )
473 rcmax = max( rcmax, c( j ) )
474 20 CONTINUE
475 IF( rcmin.LE.zero ) THEN
476 info = -14
477 ELSE IF( n.GT.0 ) THEN
478 colcnd = max( rcmin, smlnum ) / min( rcmax, bignum )
479 ELSE
480 colcnd = one
481 END IF
482 END IF
483 IF( info.EQ.0 ) THEN
484 IF( ldb.LT.max( 1, n ) ) THEN
485 info = -16
486 ELSE IF( ldx.LT.max( 1, n ) ) THEN
487 info = -18
488 END IF
489 END IF
490 END IF
491*
492 IF( info.NE.0 ) THEN
493 CALL xerbla( 'DGBSVX', -info )
494 RETURN
495 END IF
496*
497 IF( equil ) THEN
498*
499* Compute row and column scalings to equilibrate the matrix A.
500*
501 CALL dgbequ( n, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd,
502 $ amax, infequ )
503 IF( infequ.EQ.0 ) THEN
504*
505* Equilibrate the matrix.
506*
507 CALL dlaqgb( n, n, kl, ku, ab, ldab, r, c, rowcnd,
508 $ colcnd,
509 $ amax, equed )
510 rowequ = lsame( equed, 'R' ) .OR. lsame( equed, 'B' )
511 colequ = lsame( equed, 'C' ) .OR. lsame( equed, 'B' )
512 END IF
513 END IF
514*
515* Scale the right hand side.
516*
517 IF( notran ) THEN
518 IF( rowequ ) THEN
519 DO 40 j = 1, nrhs
520 DO 30 i = 1, n
521 b( i, j ) = r( i )*b( i, j )
522 30 CONTINUE
523 40 CONTINUE
524 END IF
525 ELSE IF( colequ ) THEN
526 DO 60 j = 1, nrhs
527 DO 50 i = 1, n
528 b( i, j ) = c( i )*b( i, j )
529 50 CONTINUE
530 60 CONTINUE
531 END IF
532*
533 IF( nofact .OR. equil ) THEN
534*
535* Compute the LU factorization of the band matrix A.
536*
537 DO 70 j = 1, n
538 j1 = max( j-ku, 1 )
539 j2 = min( j+kl, n )
540 CALL dcopy( j2-j1+1, ab( ku+1-j+j1, j ), 1,
541 $ afb( kl+ku+1-j+j1, j ), 1 )
542 70 CONTINUE
543*
544 CALL dgbtrf( n, n, kl, ku, afb, ldafb, ipiv, info )
545*
546* Return if INFO is non-zero.
547*
548 IF( info.GT.0 ) THEN
549*
550* Compute the reciprocal pivot growth factor of the
551* leading rank-deficient INFO columns of A.
552*
553 anorm = zero
554 DO 90 j = 1, info
555 DO 80 i = max( ku+2-j, 1 ), min( n+ku+1-j, kl+ku+1 )
556 anorm = max( anorm, abs( ab( i, j ) ) )
557 80 CONTINUE
558 90 CONTINUE
559 rpvgrw = dlantb( 'M', 'U', 'N', info, min( info-1,
560 $ kl+ku ),
561 $ afb( max( 1, kl+ku+2-info ), 1 ), ldafb,
562 $ work )
563 IF( rpvgrw.EQ.zero ) THEN
564 rpvgrw = one
565 ELSE
566 rpvgrw = anorm / rpvgrw
567 END IF
568 work( 1 ) = rpvgrw
569 rcond = zero
570 RETURN
571 END IF
572 END IF
573*
574* Compute the norm of the matrix A and the
575* reciprocal pivot growth factor RPVGRW.
576*
577 IF( notran ) THEN
578 norm = '1'
579 ELSE
580 norm = 'I'
581 END IF
582 anorm = dlangb( norm, n, kl, ku, ab, ldab, work )
583 rpvgrw = dlantb( 'M', 'U', 'N', n, kl+ku, afb, ldafb, work )
584 IF( rpvgrw.EQ.zero ) THEN
585 rpvgrw = one
586 ELSE
587 rpvgrw = dlangb( 'M', n, kl, ku, ab, ldab, work ) / rpvgrw
588 END IF
589*
590* Compute the reciprocal of the condition number of A.
591*
592 CALL dgbcon( norm, n, kl, ku, afb, ldafb, ipiv, anorm, rcond,
593 $ work, iwork, info )
594*
595* Compute the solution matrix X.
596*
597 CALL dlacpy( 'Full', n, nrhs, b, ldb, x, ldx )
598 CALL dgbtrs( trans, n, kl, ku, nrhs, afb, ldafb, ipiv, x, ldx,
599 $ info )
600*
601* Use iterative refinement to improve the computed solution and
602* compute error bounds and backward error estimates for it.
603*
604 CALL dgbrfs( trans, n, kl, ku, nrhs, ab, ldab, afb, ldafb,
605 $ ipiv,
606 $ b, ldb, x, ldx, ferr, berr, work, iwork, info )
607*
608* Transform the solution matrix X to a solution of the original
609* system.
610*
611 IF( notran ) THEN
612 IF( colequ ) THEN
613 DO 110 j = 1, nrhs
614 DO 100 i = 1, n
615 x( i, j ) = c( i )*x( i, j )
616 100 CONTINUE
617 110 CONTINUE
618 DO 120 j = 1, nrhs
619 ferr( j ) = ferr( j ) / colcnd
620 120 CONTINUE
621 END IF
622 ELSE IF( rowequ ) THEN
623 DO 140 j = 1, nrhs
624 DO 130 i = 1, n
625 x( i, j ) = r( i )*x( i, j )
626 130 CONTINUE
627 140 CONTINUE
628 DO 150 j = 1, nrhs
629 ferr( j ) = ferr( j ) / rowcnd
630 150 CONTINUE
631 END IF
632*
633* Set INFO = N+1 if the matrix is singular to working precision.
634*
635 IF( rcond.LT.dlamch( 'Epsilon' ) )
636 $ info = n + 1
637*
638 work( 1 ) = rpvgrw
639 RETURN
640*
641* End of DGBSVX
642*
643 END
subroutine xerbla(srname, info)
Definition cblat2.f:3285
subroutine dcopy(n, dx, incx, dy, incy)
DCOPY
Definition dcopy.f:82
subroutine dgbcon(norm, n, kl, ku, ab, ldab, ipiv, anorm, rcond, work, iwork, info)
DGBCON
Definition dgbcon.f:145
subroutine dgbequ(m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, info)
DGBEQU
Definition dgbequ.f:152
subroutine dgbrfs(trans, n, kl, ku, nrhs, ab, ldab, afb, ldafb, ipiv, b, ldb, x, ldx, ferr, berr, work, iwork, info)
DGBRFS
Definition dgbrfs.f:204
subroutine dgbsvx(fact, trans, n, kl, ku, nrhs, ab, ldab, afb, ldafb, ipiv, equed, r, c, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info)
DGBSVX computes the solution to system of linear equations A * X = B for GB matrices
Definition dgbsvx.f:367
subroutine dgbtrf(m, n, kl, ku, ab, ldab, ipiv, info)
DGBTRF
Definition dgbtrf.f:142
subroutine dgbtrs(trans, n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info)
DGBTRS
Definition dgbtrs.f:137
subroutine dlacpy(uplo, m, n, a, lda, b, ldb)
DLACPY copies all or part of one two-dimensional array to another.
Definition dlacpy.f:101
subroutine dlaqgb(m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, equed)
DLAQGB scales a general band matrix, using row and column scaling factors computed by sgbequ.
Definition dlaqgb.f:158