LFTRB

   more...
Computes the LU factorization of a real matrix in band storage mode.
Required Arguments
A — (NLCA + NUCA + 1) by N array containing the N by N matrix in band storage mode to be factored. (Input)
NLCA — Number of lower codiagonals of A. (Input)
NUCA — Number of upper codiagonals of A. (Input)
FACT — (2 * NLCA + NUCA + 1) by N array containing the LU factorization of the matrix A. (Output)
If A is not needed, A can share the first (NLCA + NUCA + 1) * N locations with FACT.
IPVT — Vector of length N containing the pivoting information for the LU factorization. (Output)
Optional Arguments
N — Order of the matrix. (Input)
Default: N = size (A,2).
LDA — Leading dimension of A exactly as specified in the dimension statement of the calling program. (Input)
Default: LDA = size (A,1).
LDFACT — Leading dimension of FACT exactly as specified in the dimension statement of the calling program. (Input)
Default: LDFACT = size (FACT,1).
FORTRAN 90 Interface
Generic: CALL LFTRB (A, NLCA, NUCA, FACT [])
Specific: The specific interface names are S_LFTRB and D_LFTRB.
FORTRAN 77 Interface
Single: CALL LFTRB (N, A, LDA, NLCA, NUCA, FACT, LDFACT, IPVT)
Double: The double precision name is DLFTRB.
Description
Routine LFTRB performs an LU factorization of a real banded coefficient matrix using Gaussian elimination with partial pivoting. A failure occurs if U, the upper triangular factor, has a zero diagonal element. This can happen if A is close to a singular matrix. The LU factors are returned in a form that is compatible with routines LFIRB, LFSRB and LFDRB. To solve systems of equations with multiple right-hand-side vectors, use LFTRB followed by either LFIRB or LFSRB called once for each right-hand side. The routine LFDRB can be called to compute the determinant of the coefficient matrix after LFTRB has performed the factorization
Let ml = NLCA, and let mu = NUCA. The first ml + mu + 1 rows of FACT contain the triangular matrix U in band storage form. The next ml rows of FACT contain the multipliers needed to produce L.
The routine LFTRB is based on the the blocked LU factorization algorithm for banded linear systems given in Du Croz, et al. (1990). Level-3 BLAS invocations were replaced by in-line loops. The blocking factor nb has the default value 1 in LFTRB. It can be reset to any positive value not exceeding 32.
Comments
1. Workspace may be explicitly provided, if desired, by use of L2TRB/DL2TRB. The reference is:
CALL L2TRB (N, A, LDA, NLCA, NUCA, FACT, LDFACT, IPVT, WK)
The additional argument is:
WK — Work vector of length N used for scaling.
2 Informational error
Type
Code
Description
4
2
The input matrix is singular.
3. Utilities with Chapter 11 Options Manager
21 The performance of the LU factorization may improve on high-performance computers if the blocking factor, NB, is increased. The current version of the routine allows NB to be reset to a value no larger than 32. Default value is NB = 1.
Example
A linear system with multiple right-hand sides is solved. LFTRB is called to factor the coefficient matrix. LFSRB is called to compute the two solutions for the two right-hand sides. In this case the coefficient matrix is assumed to be appropriately scaled. Otherwise, it may be better to call routine LFCRB to perform the factorization, and LFIRB to compute the solutions.
 
USE LFTRB_INT
USE LFSRB_INT
USE WRRRN_INT
! Declare variables
INTEGER LDA, LDFACT, N, NLCA, NUCA
PARAMETER (LDA=3, LDFACT=4, N=4, NLCA=1, NUCA=1)
INTEGER IPVT(N)
REAL A(LDA,N), B(N,2), FACT(LDFACT,N), X(N,2)
! Set values for A in band form, and B
!
! A = ( 0.0 -1.0 -2.0 2.0)
! ( 2.0 1.0 -1.0 1.0)
! ( -3.0 0.0 2.0 0.0)
!
! B = ( 12.0 -17.0)
! (-19.0 23.0)
! ( 6.0 5.0)
! ( 8.0 5.0)
!
DATA A/0.0, 2.0, -3.0, -1.0, 1.0, 0.0, -2.0, -1.0, 2.0,&
2.0, 1.0, 0.0/
DATA B/12.0, -19.0, 6.0, 8.0, -17.0, 23.0, 5.0, 5.0/
! Compute factorization
CALL LFTRB (A, NLCA, NUCA, FACT, IPVT)
! Solve for the two right-hand sides
DO 10 J=1, 2
CALL LFSRB (FACT, NLCA, NUCA, IPVT, B(:,J), X(:,J))
10 CONTINUE
! Print results
CALL WRRRN (’X’, X)
!
END
Output
 
X
1 2
1 3.000 -8.000
2 -6.000 1.000
3 2.000 1.000
4 4.000 3.000
Published date: 03/19/2020
Last modified date: 03/19/2020