LFDCB
Computes the determinant of a complex matrix given the LU factorization of the matrix in band storage mode.
Required Arguments
FACT — Complex (2 * NLCA + NUCA + 1) by N array containing the LU factorization of the matrix A as output from routine LFTCB/DLFTCB or LFCCB/DLFCCB. (Input)
NLCA — Number of lower codiagonals in matrix A. (Input)
NUCA — Number of upper codiagonals in matrix A. (Input)
IPVT — Vector of length N containing the pivoting information for the LU factorization as output from routine LFTCB/DLFTCB or LFCCB/DLFCCB. (Input)
DET1 — Complex 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 LFDCB (FACT, NLCA, NUCA, IPVT, DET1, DET2 [, …])
Specific: The specific interface names are S_LFDCB and D_LFDCB.
FORTRAN 77 Interface
Single: CALL LFDCB (N, FACT, LDFACT, NLCA, NUCA, IPVT, DET1, DET2)
Double: The double precision name is DLFDCB.
Description
Routine LFDCB computes the determinant of a complex banded coefficient matrix. To compute the determinant, the coefficient matrix must first undergo an LU factorization. This may be done by calling either LFCCB or LFTCB. 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.
LFDCB is based on the LINPACK routine CGBDI; see Dongarra et al. (1979).
Example
The determinant is computed for a complex banded 4 × 4 matrix with one upper and one lower codiagonal.
 
USE LFDCB_INT
USE LFTCB_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 DET2
COMPLEX A(LDA,N), DET1, FACT(LDFACT,N)
!
! Set values for A in band form
!
! A = ( 0.0+0.0i 4.0+0.0i -2.0+2.0i -4.0-1.0i )
! ( -2.0-3.0i -0.5+3.0i 3.0-3.0i 1.0-1.0i )
! ( 6.0+1.0i 1.0+1.0i 0.0+2.0i 0.0+0.0i )
!
DATA A/(0.0,0.0), (-2.0,-3.0), (6.0,1.0), (4.0,0.0), (-0.5,3.0),&
(1.0,1.0), (-2.0,2.0), (3.0,-3.0), (0.0,2.0), (-4.0,-1.0),&
(1.0,-1.0), (0.0,0.0)/
!
CALL LFTCB (A, NLCA, NUCA, FACT, IPVT)
! Compute the determinant
CALL LFDCB (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, ’,’, F6.3, ’) * 10**’,&
F2.0)
END
Output
 
The determinant of A is ( 2.500,-1.500) * 10**1.
Published date: 03/19/2020
Last modified date: 03/19/2020