LFDRB
Computes the determinant of a real matrix in band storage mode given the LU factorization of the matrix.
Required Arguments
FACT — (2 * NLCA + NUCA + 1) by N array containing the LU factorization of the matrix A as output from routine LFTRB/DLFTRB or LFCRB/DLFCRB. (Input)
NLCA — Number of lower codiagonals of A. (Input)
NUCA — Number of upper codiagonals of A. (Input)
IPVT — Vector of length N containing the pivoting information for the LU factorization as output from routine LFTRB/DLFTRB or LFCRB/DLFCRB. (Input)
DET1 — Scalar containing the mantissa of the determinant. (Output)
The value DET1 is normalized so that 1.0  DET1 < 10.0 or DET1 = 0.0.
DET2 — Scalar containing the exponent of the determinant. (Output)
The determinant is returned in the form det(A) = DET1 * 10DET2.
Optional Arguments
N — Order of the matrix. (Input)
Default: N = size (FACT,2).
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 LFDRB (FACT, NLCA, NUCA, IPVT, DET1, DET2 [])
Specific: The specific interface names are S_LFDRB and D_LFDRB.
FORTRAN 77 Interface
Single: CALL LFDRB (N, FACT, LDFACT, NLCA, NUCA, IPVT, DET1, DET2)
Double: The double precision name is DLFDRB.
Description
Routine LFDRB computes the determinant of a real banded coefficient matrix. To compute the determinant, the coefficient matrix must first undergo an LU factorization. This may be done by calling either LFCRB or LFTRB. The formula det A = det L det U is used to compute the determinant. Since the determinant of a triangular matrix is the product of the diagonal elements,
(The matrix U is stored in the upper NUCA + NLCA + 1 rows of FACT as a banded matrix.) Since L is the product of triangular matrices with unit diagonals and of permutation matrices, det L = (1)k, where k is the number of pivoting interchanges.
LFDRB is based on the LINPACK routine CGBDI; see Dongarra et al. (1979).
Example
The determinant is computed for a real banded 4 × 4 matrix with one upper and one lower codiagonal.
 
USE LFDRB_INT
USE LFTRB_INT
USE UMACH_INT
! Declare variables
INTEGER LDA, LDFACT, N, NLCA, NUCA, NOUT
PARAMETER (LDA=3, LDFACT=4, N=4, NLCA=1, NUCA=1)
INTEGER IPVT(N)
REAL A(LDA,N), DET1, DET2, FACT(LDFACT,N)
! Set values for A in band form
! 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)
!
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/
!
CALL LFTRB (A, NLCA, NUCA, FACT, IPVT)
! Compute the determinant
CALL LFDRB (FACT, NLCA, NUCA, IPVT, DET1, DET2)
! Print the results
CALL UMACH (2, NOUT)
WRITE (NOUT,99999) DET1, DET2
99999 FORMAT (’ The determinant of A is ’, F6.3, ’ * 10**’, F2.0)
END
Output
 
The determinant of A is 5.000 * 10**0.
Published date: 03/19/2020
Last modified date: 03/19/2020