LSLQH
Solves a complex Hermitian positive definite system of linear equations in band Hermitian storage mode without iterative refinement.
Required Arguments
A — Complex NCODA + 1 by N array containing the N by N positive definite band Hermitian coefficient matrix in band Hermitian storage mode. (Input)
NCODA — Number of upper or lower codiagonals of A. (Input)
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 LSLQH (A, NCODA, B, X [, …])
Specific: The specific interface names are S_LSLQH and D_LSLQH.
FORTRAN 77 Interface
Single: CALL LSLQH (N, A, LDA, NCODA, B, X)
Double: The double precision name is DLSLQH.
Description
Routine LSLQH solves a system of linear algebraic equations having a complex Hermitian positive definite band coefficient matrix. It first uses the routine LFCQH to compute an RH R Cholesky factorization of the coefficient matrix and to estimate the condition number of the matrix. R is an upper triangular band matrix. The solution of the linear system is then found using the routine LFSQH.
LSLQH fails if any submatrix of R is not positive definite or if R has a zero diagonal element. These errors occur only if A either is very close to a singular matrix or is a matrix that is not positive definite.
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. If the coefficient matrix is ill-conditioned or poorly sealed, it is recommended that LSAQH be used.
Comments
1. Workspace may be explicitly provided, if desired, by use of L2LQH/DL2LQH The reference is:
CALL L2LQH (N, A, LDA, NCODA, B, X, FACT, WK)
The additional arguments are as follows:
FACT — (NCODA + 1) × N complex work array containing the RH R factorization of A in band Hermitian storage form on output. If A is not needed, A and FACT can share the same storage locations.
WK — Complex work vector of length N.
2. Informational errors
Type
Code
Description
3
3
The input matrix is too ill-conditioned. The solution might not be accurate.
3
4
The input matrix is not Hermitian. It has a diagonal entry with a small imaginary part.
4
2
The input matrix is not positive definite.
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 L2LQH 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 LSLQH. Additional memory allocation for FACT and option value restoration are done automatically in LSLQH. Users directly calling L2LQH 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 LSLQH or L2LQH. 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 LSLQH temporarily replaces IVAL(2) by IVAL(1). The routine L2CQH computes the condition number if IVAL(2) = 2. Otherwise L2CQH skips this computation. LSLQH restores the option. Default values for the option are IVAL(*) = 1, 2.
Example
A system of five linear equations is solved. The coefficient matrix has complex Hermitian positive definite band form with one codiagonal and the right-hand-side vector b has five elements.
 
USE LSLQH_INT
USE WRCRN_INT
! Declare variables
INTEGER N, NCODA, LDA
PARAMETER (N=5, NCODA=1, LDA=NCODA+1)
COMPLEX A(LDA,N), B(N), X(N)
!
! Set values for A in band Hermitian form, and B
!
! A = ( 0.0+0.0i -1.0+1.0i 1.0+2.0i 0.0+4.0i 1.0+1.0i )
! ( 2.0+0.0i 4.0+0.0i 10.0+0.0i 6.0+0.0i 9.0+0.0i )
!
! B = ( 1.0+5.0i 12.0-6.0i 1.0-16.0i -3.0-3.0i 25.0+16.0i )
!
DATA A/(0.0,0.0), (2.0,0.0), (-1.0,1.0), (4.0, 0.0), (1.0,2.0),&
(10.0,0.0), (0.0,4.0), (6.0,0.0), (1.0,1.0), (9.0,0.0)/
DATA B/(1.0,5.0), (12.0,-6.0), (1.0,-16.0), (-3.0,-3.0),&
(25.0,16.0)/
! Solve A*X = B
CALL LSLQH (A, NCODA, B, X)
! Print results
CALL WRCRN (’X’, X, 1, N, 1)
!
END
Output
 
X
1 2 3 4
( 2.000, 1.000) ( 3.000, 0.000) (-1.000,-1.000) ( 0.000,-2.000)
 
5
( 3.000, 2.000)