F11 Chapter Contents
F11 Chapter Introduction
NAG Library Manual

# NAG Library Routine DocumentF11JPF

Note:  before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.

## 1  Purpose

F11JPF solves a system of complex linear equations involving the incomplete Cholesky preconditioning matrix generated by F11JNF.

## 2  Specification

 SUBROUTINE F11JPF ( N, A, LA, IROW, ICOL, IPIV, ISTR, CHECK, Y, X, IFAIL)
 INTEGER N, LA, IROW(LA), ICOL(LA), IPIV(N), ISTR(N+1), IFAIL COMPLEX (KIND=nag_wp) A(LA), Y(N), X(N) CHARACTER(1) CHECK

## 3  Description

F11JPF solves a system of linear equations
 $Mx=y$
involving the preconditioning matrix $M=PLD{L}^{\mathrm{H}}{P}^{\mathrm{T}}$, corresponding to an incomplete Cholesky decomposition of a complex sparse Hermitian matrix stored in symmetric coordinate storage (SCS) format (see Section 2.1.2 in the F11 Chapter Introduction), as generated by F11JNF.
In the above decomposition $L$ is a complex lower triangular sparse matrix with unit diagonal, $D$ is a real diagonal matrix and $P$ is a permutation matrix. $L$ and $D$ are supplied to F11JPF through the matrix
 $C=L+D-1-I$
which is a lower triangular $n$ by $n$ complex sparse matrix, stored in SCS format, as returned by F11JNF. The permutation matrix $P$ is returned from F11JNF via the array IPIV.
F11JPF may also be used in combination with F11JNF to solve a sparse complex Hermitian positive definite system of linear equations directly (see F11JNF). This is illustrated in Section 9.
None.

## 5  Parameters

1:     N – INTEGERInput
On entry: $n$, the order of the matrix $M$. This must be the same value as was supplied in the preceding call to F11JNF.
Constraint: ${\mathbf{N}}\ge 1$.
2:     A(LA) – COMPLEX (KIND=nag_wp) arrayInput
On entry: the values returned in the array A by a previous call to F11JNF.
3:     LA – INTEGERInput
On entry: the dimension of the arrays A, IROW and ICOL as declared in the (sub)program from which F11JPF is called. This must be the same value supplied in the preceding call to F11JNF.
4:     IROW(LA) – INTEGER arrayInput
5:     ICOL(LA) – INTEGER arrayInput
6:     IPIV(N) – INTEGER arrayInput
7:     ISTR(${\mathbf{N}}+1$) – INTEGER arrayInput
On entry: the values returned in arrays IROW, ICOL, IPIV and ISTR by a previous call to F11JNF.
8:     CHECK – CHARACTER(1)Input
On entry: specifies whether or not the input data should be checked.
${\mathbf{CHECK}}=\text{'C'}$
Checks are carried out on the values of N, IROW, ICOL, IPIV and ISTR.
${\mathbf{CHECK}}=\text{'N'}$
None of these checks are carried out.
Constraint: ${\mathbf{CHECK}}=\text{'C'}$ or $\text{'N'}$.
9:     Y(N) – COMPLEX (KIND=nag_wp) arrayInput
On entry: the right-hand side vector $y$.
10:   X(N) – COMPLEX (KIND=nag_wp) arrayOutput
On exit: the solution vector $x$.
11:   IFAIL – INTEGERInput/Output
On entry: IFAIL must be set to $0$, $-1\text{​ or ​}1$. If you are unfamiliar with this parameter you should refer to Section 3.3 in the Essential Introduction for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value $-1\text{​ or ​}1$ is recommended. If the output of error messages is undesirable, then the value $1$ is recommended. Otherwise, if you are not familiar with this parameter, the recommended value is $0$. When the value $-\mathbf{1}\text{​ or ​}\mathbf{1}$ is used it is essential to test the value of IFAIL on exit.
On exit: ${\mathbf{IFAIL}}={\mathbf{0}}$ unless the routine detects an error or a warning has been flagged (see Section 6).

## 6  Error Indicators and Warnings

If on entry ${\mathbf{IFAIL}}={\mathbf{0}}$ or $-{\mathbf{1}}$, explanatory error messages are output on the current error message unit (as defined by X04AAF).
Errors or warnings detected by the routine:
${\mathbf{IFAIL}}=1$
 On entry, ${\mathbf{CHECK}}\ne \text{'C'}$ or $\text{'N'}$.
${\mathbf{IFAIL}}=2$
 On entry, ${\mathbf{N}}<1$.
${\mathbf{IFAIL}}=3$
On entry, the SCS representation of the preconditioning matrix $M$ is invalid. Further details are given in the error message. Check that the call to F11JPF has been preceded by a valid call to F11JNF and that the arrays A, IROW, ICOL, IPIV and ISTR have not been corrupted between the two calls.

## 7  Accuracy

The computed solution $x$ is the exact solution of a perturbed system of equations $\left(M+\delta M\right)x=y$, where
 $δM≤cnεPLDLHPT,$
$c\left(n\right)$ is a modest linear function of $n$, and $\epsilon$ is the machine precision.

### 8.1  Timing

The time taken for a call to F11JPF is proportional to the value of NNZC returned from F11JNF.

## 9  Example

This example reads in a complex sparse Hermitian positive definite matrix $A$ and a vector $y$. It then calls F11JNF, with ${\mathbf{LFILL}}=-1$ and ${\mathbf{DTOL}}=0.0$, to compute the complete Cholesky decomposition of $A$:
 $A=PLDLHPT.$
Finally it calls F11JPF to solve the system
 $PLDLHPTx=y.$

### 9.1  Program Text

Program Text (f11jpfe.f90)

### 9.2  Program Data

Program Data (f11jpfe.d)

### 9.3  Program Results

Program Results (f11jpfe.r)