LFCRB

Computes the LU factorization of a real matrix in band storage mode and estimate its L1 condition number.

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)

RCOND — Scalar containing an estimate of the reciprocal of the L1 condition number of A.   (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).

LDFACTLeading 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 LFCRB (A, NLCA, NUCA, FACT, IPVT, RCOND [,…])

Specific:                             The specific interface names are S_LFCRB and D_LFCRB.

FORTRAN 77 Interface

Single:                                CALL LFCRB (N, A, LDA, NLCA, NUCA, FACT, LDFACT, IPVT, RCOND)

Double:                              The double precision name is DLFCRB.

Description

Routine LFCRB performs an LU factorization of a real banded coefficient matrix. It also estimates the condition number of the matrix. The LU factorization is done using scaled partial pivoting. Scaled partial pivoting differs from partial pivoting in that the pivoting strategy is the same as if each row were scaled to have the same -norm.

The L1 condition number of the matrix A is defined to be κ(A) = ǀǀAǀǀ1ǀǀA-1ǀǀ1. Since it is expensive to compute ǀǀA-1ǀǀ1, the condition number is only estimated. The estimation algorithm is the same as used by LINPACK and is described by Cline et al. (1979).

If the estimated condition number is greater than 1/ɛ (where ɛ is machine precision), a warning error is issued. This indicates that very small changes in  A can cause very large changes in the solution x. Iterative refinement can sometimes find the solution to such a system.

LSCRB fails if U, the upper triangular part of the factorization, has a zero diagonal element. This can occur only if A is singular or very 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 LFCRB 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 LFCRB has performed the factorization.

Let F be the matrix FACT, let ml= NLCA and let mu = NUCA. The first ml+ mu + 1 rows of F contain the triangular matrix U in band storage form. The lower ml rows of F contain the multipliers needed to reconstruct L-1 .

The underlying code is based on either LINPACK or LAPACK code depending upon which supporting libraries are used during linking. For a detailed explanation see “Using ScaLAPACK, LAPACK, LINPACK, and EISPACK” in the Introduction section of this manual.

Comments

1.         Workspace may be explicitly provided, if desired, by use of L2CRB/DL2CRB. The reference is:

CALL L2CRB (N, A, LDA, NLCA, NUCA, FACT, LDFACT, IPVT, RCOND, WK)

The additional argument is:

WK — Work vector of length N.

2.         Informational errors

Type   Code

3           1                  The input matrix is algorithmically singular.

4           2                  The input matrix is singular.

Example

The inverse of a 4 × 4 band matrix with one upper and one lower codiagonal is computed. LFCRB is called to factor the matrix and to check for singularity or ill-conditioning. LFIRB is called to determine the columns of the inverse.

 

      USE LFCRB_INT
      USE UMACH_INT
      USE LFIRB_INT
      USE WRRRN_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), AINV(N,N), FACT(LDFACT,N), RCOND, RJ(N), RES(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 LFCRB (A, NLCA, NUCA, FACT, IPVT, RCOND)

!                                 Print the reciprocal condition number

!                                 and the L1 condition number

      CALL UMACH (2, NOUT)

      WRITE (NOUT,99999) RCOND, 1.0E0/RCOND

!                                 Set up the columns of the identity

!                                 matrix one at a time in RJ

      RJ = 0.0E0

      DO 10  J=1, N

         RJ(J) = 1.0E0

!                                 RJ is the J-th column of the identity

!                                 matrix so the following LFIRB

!                                 reference places the J-th column of

!                                 the inverse of A in the J-th column

!                                 of AINV

         CALL LFIRB (A, NLCA, NUCA, FACT, IPVT, RJ, AINV(:,J), RES)

         RJ(J) = 0.0E0

   10 CONTINUE

!                                 Print results

      CALL WRRRN ('AINV', AINV)

 

 

!

99999 FORMAT ('  RCOND = ',F5.3,/,'  L1 Condition number = ',F6.3)

      END

Output

 

RCOND < .07
L1 Condition number = 25.0


               AINV

        1       2       3       4

1  -1.000  -1.000   0.400  -0.800

2  -3.000  -2.000   0.800  -1.600

3   0.000   0.000  -0.200   0.400

4   0.000   0.000   0.400   0.200


Visual Numerics, Inc.
Visual Numerics - Developers of IMSL and PV-WAVE
http://www.vni.com/
PHONE: 713.784.3131
FAX:713.781.9260