LSLHF

   more...
Solves a complex Hermitian system of linear equations without iterative refinement.
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.
B — Complex vector of length N containing the right-hand side of the linear system. (Input)
X — Complex vector of length N containing the solution to the linear system. (Output)
Optional Arguments
N Number of equations. (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).
FORTRAN 90 Interface
Generic: CALL LSLHF (A, B, X [, …])
Specific: The specific interface names are S_LSLHF and D_LSLHF.
FORTRAN 77 Interface
Single: CALL LSLHF (N, A, LDA, B, X)
Double: The double precision name is DLSLHF.
Description
Routine LSLHF solves systems of linear algebraic equations having a complex Hermitian indefinite coefficient matrix. It first uses the routine LFCHF to compute a UDUH factorization of the coefficient matrix. D is a block diagonal matrix with blocks of order 1 or 2 and U is a matrix composed of the product of a permutation matrix and a unit upper triangular matrix.
The solution of the linear system is then found using the routine LFSHF. LSLHF fails if a block in D is singular. This occurs only if A is singular or very close to a singular matrix. If the coefficient matrix is ill-conditioned or poorly scaled, it is recommended that LSAHF be used.
Comments
1. Workspace may be explicitly provided, if desired, by use of L2LHF/DL2LHF. The reference is:
CALL L2LHF (N, A, LDA, B, X, FACT, IPVT, CWK)
The additional arguments are as follows:
FACT — Complex work vector of length N2 containing information about the UDUH factorization of A on output.
IPVT — Integer work vector of length N containing the pivoting information for the factorization of A on output.
CWK — Complex work vector of length N.
2. Informational errors
Type
Code
Description
3
1
The input matrix is algorithmically singular.
3
4
The input matrix is not Hermitian. It has a diagonal entry with a small imaginary part.
4
2
The input matrix singular.
4
4
The input matrix is not Hermitian. It has a diagonal entry with an imaginary part.
3. Integer Options with Chapter 11 Options Manager
16 This option uses four values to solve memory bank conflict (access inefficiency) problems. In routine L2LHF the leading dimension of FACT is increased by IVAL(3) when N is a multiple of IVAL(4). The values IVAL(3) and IVAL(4) are temporarily replaced by IVAL(1) and IVAL(2), respectively, in LSLHF. Additional memory allocation for FACT and option value restoration are done automatically in LSLHF. Users directly calling L2LHF can allocate additional space for FACT and set IVAL(3) and IVAL(4) so that memory bank conflicts no longer cause inefficiencies. There is no requirement that users change existing applications that use LSLHF or L2LHF. Default values for the option are IVAL(*) = 1, 16, 0, 1.
17 This option has two values that determine if the L1 condition number is to be computed. Routine LSLHF temporarily replaces IVAL(2) by IVAL(1). The routine L2CHF computes the condition number if IVAL(2) = 2. Otherwise L2CHF skips this computation. LSLHF restores the option. Default values for the option are IVAL(*) = 1, 2.
Example
A system of three linear equations is solved. The coefficient matrix has complex Hermitian form and the right-hand-side vector b has three elements.
 
USE LSLHF_INT
USE WRCRN_INT
! Declare variables
INTEGER LDA, N
PARAMETER (LDA=3, N=3)
COMPLEX A(LDA,LDA), B(N), X(N)
!
! Set values for A and B
!
! 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 )
!
! B = ( 7.0+32.0i -39.0-21.0i 51.0+9.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)/
DATA B/(7.0,32.0), (-39.0,-21.0), (51.0,9.0)/
!
CALL LSLHF (A, B, X)
! Print results
CALL WRCRN (’X’, X, 1, N, 1)
END
Output
 
X
1 2 3
( 2.00, 1.00) (-10.00, -1.00) ( 3.00, 5.00)
Published date: 03/19/2020
Last modified date: 03/19/2020