F11DPF (PDF version)
F11 Chapter Contents
F11 Chapter Introduction
NAG Library Manual

NAG Library Routine Document

F11DPF

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.

 Contents

    1  Purpose
    7  Accuracy

1  Purpose

F11DPF solves a system of complex linear equations involving the incomplete LU preconditioning matrix generated by F11DNF.

2  Specification

SUBROUTINE F11DPF ( TRANS, N, A, LA, IROW, ICOL, IPIVP, IPIVQ, ISTR, IDIAG, CHECK, Y, X, IFAIL)
INTEGER  N, LA, IROW(LA), ICOL(LA), IPIVP(N), IPIVQ(N), ISTR(N+1), IDIAG(N), IFAIL
COMPLEX (KIND=nag_wp)  A(LA), Y(N), X(N)
CHARACTER(1)  TRANS, CHECK

3  Description

F11DPF solves a system of complex linear equations
Mx=y,   or  MTx=y,  
according to the value of the parameter TRANS, where the matrix M=PLDUQ corresponds to an incomplete LU decomposition of a complex sparse matrix stored in coordinate storage (CS) format (see Section 2.1.1 in the F11 Chapter Introduction), as generated by F11DNF.
In the above decomposition L is a lower triangular sparse matrix with unit diagonal elements, D is a diagonal matrix, U is an upper triangular sparse matrix with unit diagonal elements and, P and Q are permutation matrices. L, D and U are supplied to F11DPF through the matrix
C=L+D-1+U-2I  
which is an N by N sparse matrix, stored in CS format, as returned by F11DNF. The permutation matrices P and Q are returned from F11DNF via the arrays IPIVP and IPIVQ.
It is envisaged that a common use of F11DPF will be to carry out the preconditioning step required in the application of F11BSF to sparse complex linear systems. F11DPF is used for this purpose by the Black Box routine F11DQF.
F11DPF may also be used in combination with F11DNF to solve a sparse system of complex linear equations directly (see Section 9.5 in F11DNF). This use of F11DPF is illustrated in Section 10.

4  References

None.

5  Parameters

1:     TRANS – CHARACTER(1)Input
On entry: specifies whether or not the matrix M is transposed.
TRANS='N'
Mx=y is solved.
TRANS='T'
MTx=y is solved.
Constraint: TRANS='N' or 'T'.
2:     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 F11DNF.
Constraint: N1.
3:     ALA – COMPLEX (KIND=nag_wp) arrayInput
On entry: the values returned in the array A by a previous call to F11DNF.
4:     LA – INTEGERInput
On entry: the dimension of the arrays A, IROW and ICOL as declared in the (sub)program from which F11DPF is called. This must be the same value supplied in the preceding call to F11DNF.
5:     IROWLA – INTEGER arrayInput
6:     ICOLLA – INTEGER arrayInput
7:     IPIVPN – INTEGER arrayInput
8:     IPIVQN – INTEGER arrayInput
9:     ISTRN+1 – INTEGER arrayInput
10:   IDIAGN – INTEGER arrayInput
On entry: the values returned in arrays IROW, ICOL, IPIVP, IPIVQ, ISTR and IDIAG by a previous call to F11DNF.
11:   CHECK – CHARACTER(1)Input
On entry: specifies whether or not the CS representation of the matrix M should be checked.
CHECK='C'
Checks are carried on the values of N, IROW, ICOL, IPIVP, IPIVQ, ISTR and IDIAG.
CHECK='N'
None of these checks are carried out.
See also Section 9.2.
Constraint: CHECK='C' or 'N'.
12:   YN – COMPLEX (KIND=nag_wp) arrayInput
On entry: the right-hand side vector y.
13:   XN – COMPLEX (KIND=nag_wp) arrayOutput
On exit: the solution vector x.
14:   IFAIL – INTEGERInput/Output
On entry: IFAIL must be set to 0, -1​ 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​ 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 -1​ or ​1 is used it is essential to test the value of IFAIL on exit.
On exit: IFAIL=0 unless the routine detects an error or a warning has been flagged (see Section 6).

6  Error Indicators and Warnings

If on entry IFAIL=0 or -1, explanatory error messages are output on the current error message unit (as defined by X04AAF).
Errors or warnings detected by the routine:
IFAIL=1
On entry,TRANS'N' or 'T',
orCHECK'C' or 'N'.
IFAIL=2
On entry,N<1.
IFAIL=3
On entry, the CS representation of the preconditioning matrix M is invalid. Further details are given in the error message. Check that the call to F11DPF has been preceded by a valid call to F11DNF and that the arrays A, IROW, ICOL, IPIVP, IPIVQ, ISTR and IDIAG have not been corrupted between the two calls.
IFAIL=-99
An unexpected error has been triggered by this routine. Please contact NAG.
See Section 3.8 in the Essential Introduction for further information.
IFAIL=-399
Your licence key may have expired or may not have been installed correctly.
See Section 3.7 in the Essential Introduction for further information.
IFAIL=-999
Dynamic memory allocation failed.
See Section 3.6 in the Essential Introduction for further information.

7  Accuracy

If TRANS='N' the computed solution x is the exact solution of a perturbed system of equations M+δMx=y, where
δMcnεPLDUQ,  
cn is a modest linear function of n, and ε is the machine precision. An equivalent result holds when TRANS='T'.

8  Parallelism and Performance

Not applicable.

9  Further Comments

9.1  Timing

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

9.2  Use of CHECK

It is expected that a common use of F11DPF will be to carry out the preconditioning step required in the application of F11BSF to sparse complex linear systems. In this situation F11DPF is likely to be called many times with the same matrix M. In the interests of both reliability and efficiency, you are recommended to set CHECK='C' for the first of such calls, and to set CHECK='N' for all subsequent calls.

10  Example

This example reads in a complex sparse non-Hermitian matrix A and a vector y. It then calls F11DNF, with LFILL=-1 and DTOL=0.0, to compute the complete LU decomposition
A=PLDUQ.  
Finally it calls F11DPF to solve the system
PLDUQx=y.  

10.1  Program Text

Program Text (f11dpfe.f90)

10.2  Program Data

Program Data (f11dpfe.d)

10.3  Program Results

Program Results (f11dpfe.r)


F11DPF (PDF version)
F11 Chapter Contents
F11 Chapter Introduction
NAG Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2015