LFTHF

Computes the U DUH factorization of a complex Hermitian matrix.

Required Arguments

A — Complex N by N matrix containing the coefficient matrix of the Hermitian linear system.   (Input)
Only the upper triangle of A is referenced.

FACT — Complex N by N matrix containing the information about the factorization of the Hermitian 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

NOrder 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 LFTHF (A, FACT, IPVT [,…])

Specific:                             The specific interface names are S_LFTHF and D_LFTHF.

FORTRAN 77 Interface

Single:                                CALL LFTHF (N, A, LDA, FACT, LDFACT, IPVT)

Double:                              The double precision name is DLFTHF.

Description

Routine LFTHF performs a U DUH factorization of a complex Hermitian indefinite coefficient matrix. The U DUH factorization is called the diagonal pivoting factorization.

LFTHF fails if A is singular or very close to a singular matrix.

The U DUH factors are returned in a form that is compatible with routines LFIHF, LFSHF and LFDHF. To solve systems of equations with multiple right-hand-side vectors, use LFTHF followed by either LFIHF or LFSHF called once for each right-hand side. The routine LFDHF can be called to compute the determinant of the coefficient matrix after LFTHF 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 errors

Type       Code

3                   4          The input matrix is not Hermitian. It has a diagonal entry with a small imaginary part.

4                   2          The input matrix is singular.

4                   4          The input matrix is not Hermitian. It has a diagonal entry with an imaginary part.

Example

The inverse of a 3 × 3 matrix is computed. LFTHF is called to factor the matrix and check for singularity. LFSHF is called to determine the columns of the inverse.

 

      USE LFTHF_INT
      USE LFSHF_INT
      USE WRCRN_INT

!                                 Declare variables

      INTEGER    LDA, N

      PARAMETER  (LDA=3, N=3)

      INTEGER    IPVT(N)

      COMPLEX    A(LDA,LDA), AINV(LDA,N), FACT(LDA,LDA), RJ(N)

!

!                               Set values for A

!

!                               A = ( 3.0+0.0i   1.0-1.0i   4.0+0.0i )

!                                   ( 1.0+1.0i   2.0+0.0i  -5.0+1.0i )

!                                   ( 4.0+0.0i  -5.0-1.0i  -2.0+0.0i )

!

      DATA A/(3.0,0.0), (1.0,1.0), (4.0,0.0), (1.0,-1.0), (2.0,0.0),&

            (-5.0,-1.0), (4.0,0.0), (-5.0,1.0), (-2.0,0.0)/

!                                 Factor A

      CALL LFTHF (A, FACT, IPVT)

!                                 Set up the columns of the identity

!                                 matrix one at a time in RJ

      RJ = (0.0E0,0.0E0)

      DO 10  J=1, N

         RJ(J) = (1.0E0, 0.0E0)

!                                 RJ is the J-th column of the identity

!                                 matrix so the following LFSHF

!                                 reference places the J-th column of

!                                 the inverse of A in the J-th column

!                                 of AINV

         CALL LFSHF (FACT, IPVT, RJ, AINV(:,J))

         RJ(J) = (0.0E0, 0.0E0)

   10 CONTINUE

!                                 Print the inverse

      CALL WRCRN ('AINV', AINV)

      END

Output

 

                            AINV
                   1                  2                  3
1  ( 0.2000, 0.0000)  ( 0.1200, 0.0400)  ( 0.0800,-0.0400)
2  ( 0.1200,-0.0400)  ( 0.1467, 0.0000)  (-0.1267,-0.0067)
3  ( 0.0800, 0.0400)  (-0.1267, 0.0067)  (-0.0267, 0.0000)


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