LFTSF
Computes the U DUT factorization of a real symmetric matrix.
Required Arguments
A — N by N symmetric matrix to be factored. (Input)
Only the upper triangle of A is referenced.
FACT — N 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)
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 LFTSF (A, FACT, IPVT [, …])
Specific: The specific interface names are S_LFTSF and D_LFTSF.
FORTRAN 77 Interface
Single: CALL LFTSF (N, A, LDA, FACT, LDFACT, IPVT)
Double: The double precision name is DLFTSF.
Description
Routine LFTSF performs a U DUT factorization of a real symmetric indefinite coefficient matrix. The U DUT factorization is called the diagonal pivoting factorization.
LFTSF 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
LFTSF 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
LFTSF 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
Informational error
Type | Code | Description |
---|
4 | 2 | The input matrix is singular. |
Example
The inverse of a 3
× 3 matrix is computed.
LFTSF is called to factor the matrix and to check for singularity.
LFSSF is called to determine the columns of the inverse.
USE LFTSF_INT
USE LFSSF_INT
USE WRRRN_INT
! Declare variables
PARAMETER (LDA=3, N=3)
INTEGER IPVT(N)
REAL A(LDA,LDA), AINV(N,N), FACT(LDA,LDA), RJ(N)
!
! 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
CALL LFTSF (A, FACT, IPVT)
! 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 LFSSF
! reference places the J-th column of
! the inverse of A in the J-th column
! of AINV
CALL LFSSF (FACT, IPVT, RJ, AINV(:,J))
RJ(J) = 0.0E0
10 CONTINUE
! Print the inverse
CALL WRRRN (’AINV’, AINV)
END
Output
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
Published date: 03/19/2020
Last modified date: 03/19/2020