LFCSF

   more...
Computes the U DUT factorization of a real symmetric matrix and estimate its L1 condition number.
Required Arguments
AN by N symmetric matrix to be factored. (Input)
Only the upper triangle of A is referenced.
FACTN by N matrix containing information about the factorization of the symmetric matrix A. (Output)
Only the upper triangle of FACT is used. If A is not needed, A and FACT can share the same storage locations.
IPVT — Vector of length N containing the pivoting information for the 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).
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 LFCSF (A, FACT, IPVT, RCOND [, …])
Specific: The specific interface names are S_LFCSF and D_LFCSF.
FORTRAN 77 Interface
Single: CALL LFCSF (N, A, LDA, FACT, LDFACT, IPVT, RCOND)
Double: The double precision name is DLFCSF.
Description
Routine LFCSF performs a U DUT factorization of a real symmetric indefinite coefficient matrix. It also estimates the condition number of the matrix. The U DUT factorization is called the diagonal pivoting factorization.
The L1 condition number of the matrix A is defined to be κ(A) = A1A-11. Since it is expensive to compute A-11, 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.
LFCSF fails if A is singular or very close to a singular matrix.
The U DUT factors are returned in a form that is compatible with routines LFISF, LFSSF and LFDSF. To solve systems of equations with multiple right-hand-side vectors, use LFCSF followed by either LFISF or LFSSF called once for each right-hand side. The routine LFDSF can be called to compute the determinant of the coefficient matrix after LFCSF has performed the factorization.
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 L2CSF/DL2CSF. The reference is:
CALL L2CSF (N, A, LDA, FACT, LDFACT, IPVT, RCOND, WK)
The additional argument is:
WK — Work vector of length N.
2. Informational errors
Type
Code
Description
3
1
The input matrix is algorithmically singular.
4
2
The input matrix is singular.
Example
The inverse of a 3 × 3 matrix is computed. LFCSF is called to factor the matrix and to check for singularity or ill-conditioning. LFISF is called to determine the columns of the inverse.
 
USE LFCSF_INT
USE UMACH_INT
USE LFISF_INT
USE WRRRN_INT
! Declare variables
PARAMETER (LDA=3, N=3)
INTEGER IPVT(N), NOUT
REAL A(LDA,LDA), AINV(N,N), FACT(LDA,LDA), RJ(N), RES(N),&
RCOND
!
! Set values for A
!
! A = ( 1.0 -2.0 1.0)
! ( -2.0 3.0 -2.0)
! ( 1.0 -2.0 3.0)
!
DATA A/1.0, -2.0, 1.0, -2.0, 3.0, -2.0, 1.0, -2.0, 3.0/
! Factor A and return the reciprocal
! condition number estimate
CALL LFCSF (A, FACT, IPVT, RCOND)
! Print the estimate of the condition
! number
CALL UMACH (2, NOUT)
WRITE (NOUT,99999) RCOND, 1.0E0/RCOND
!
! matrix one at a time in RJ
RJ = 0.E0
DO 10 J=1, N
RJ(J) = 1.0E0
! RJ is the J-th column of the identity
! matrix so the following LFISF
! reference places the J-th column of
! the inverse of A in the J-th column
! of AINV
CALL LFISF (A, FACT, IPVT, RJ, AINV(:,J), RES)
RJ(J) = 0.0E0
10 CONTINUE
! Print the inverse
CALL WRRRN (’AINV’, AINV)
99999 FORMAT (’ RCOND = ’,F5.3,/,’ L1 Condition number = ’,F6.3)
END
Output
 
RCOND < 0.05
L1 Condition number < 40.0
 
AINV
1 2 3
1 -2.500 -2.000 -0.500
2 -2.000 -1.000 0.000
3 -0.500 0.000 0.500