NAG Library Routine Document

f11mmf  (direct_real_gen_diag)

 Contents

    1  Purpose
    7  Accuracy

1
Purpose

f11mmf computes the reciprocal pivot growth factor of an LU  factorization of a real sparse matrix in compressed column (Harwell–Boeing) format.

2
Specification

Fortran Interface
Subroutine f11mmf ( n, icolzp, a, iprm, il, lval, iu, uval, rpg, ifail)
Integer, Intent (In):: n, icolzp(*), iprm(7*n), il(*), iu(*)
Integer, Intent (Inout):: ifail
Real (Kind=nag_wp), Intent (In):: a(*), lval(*), uval(*)
Real (Kind=nag_wp), Intent (Out):: rpg
C Header Interface
#include nagmk26.h
void  f11mmf_ ( const Integer *n, const Integer icolzp[], const double a[], const Integer iprm[], const Integer il[], const double lval[], const Integer iu[], const double uval[], double *rpg, Integer *ifail)

3
Description

f11mmf computes the reciprocal pivot growth factor maxjAj/Uj from the columns Aj and Uj of an LU  factorization of the matrix A, Pr A Pc = LU  where Pr is a row permutation matrix, Pc is a column permutation matrix, L is unit lower triangular and U is upper triangular as computed by f11mef.

4
References

None.

5
Arguments

1:     n – IntegerInput
On entry: n, the order of the matrix A.
Constraint: n0.
2:     icolzp* – Integer arrayInput
Note: the dimension of the array icolzp must be at least n+1.
On entry: icolzpi contains the index in A of the start of a new column. See Section 2.1.3 in the F11 Chapter Introduction.
3:     a* – Real (Kind=nag_wp) arrayInput
Note: the dimension of the array a must be at least icolzpn+1-1, the number of nonzeros of the sparse matrix A.
On entry: the array of nonzero values in the sparse matrix A.
4:     iprm7×n – Integer arrayInput
On entry: the column permutation which defines Pc, the row permutation which defines Pr, plus associated data structures as computed by f11mef.
5:     il* – Integer arrayInput
Note: the dimension of the array il must be at least as large as the dimension of the array of the same name in f11mef.
On entry: records the sparsity pattern of matrix L as computed by f11mef.
6:     lval* – Real (Kind=nag_wp) arrayInput
Note: the dimension of the array lval must be at least as large as the dimension of the array of the same name in f11mef.
On entry: records the nonzero values of matrix L and some nonzero values of matrix U as computed by f11mef.
7:     iu* – Integer arrayInput
Note: the dimension of the array iu must be at least as large as the dimension of the array of the same name in f11mef.
On entry: records the sparsity pattern of matrix U as computed by f11mef.
8:     uval* – Real (Kind=nag_wp) arrayInput
Note: the dimension of the array uval must be at least as large as the dimension of the array of the same name in f11mef.
On entry: records some nonzero values of matrix U as computed by f11mef.
9:     rpg – Real (Kind=nag_wp)Output
On exit: the reciprocal pivot growth factor maxjAj/Uj. If the reciprocal pivot growth factor is much less than 1, the stability of the LU factorization may be poor.
10:   ifail – IntegerInput/Output
On entry: ifail must be set to 0, -1​ or ​1. If you are unfamiliar with this argument you should refer to Section 3.4 in How to Use the NAG Library and its Documentation 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 argument, 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, n=value.
Constraint: n0.
ifail=2
Incorrect column permutations in array iprm.
ifail=-99
An unexpected error has been triggered by this routine. Please contact NAG.
See Section 3.9 in How to Use the NAG Library and its Documentation for further information.
ifail=-399
Your licence key may have expired or may not have been installed correctly.
See Section 3.8 in How to Use the NAG Library and its Documentation for further information.
ifail=-999
Dynamic memory allocation failed.
See Section 3.7 in How to Use the NAG Library and its Documentation for further information.

7
Accuracy

Not applicable.

8
Parallelism and Performance

f11mmf is not threaded in any implementation.

9
Further Comments

If the reciprocal pivot growth factor, rpg, is much less than 1, then the factorization of the matrix A could be poor. This means that using the factorization to obtain solutions to a linear system, forward error bounds and estimates of the condition number could be unreliable. Consider increasing the thresh argument in the call to f11mef.

10
Example

To compute the reciprocal pivot growth for the factorization of the matrix A, where
A= 2.00 1.00 0 0 0 0 0 1.00 -1.00 0 4.00 0 1.00 0 1.00 0 0 0 1.00 2.00 0 -2.00 0 0 3.00 .  
In this case, it should be equal to 1.0.

10.1
Program Text

Program Text (f11mmfe.f90)

10.2
Program Data

Program Data (f11mmfe.d)

10.3
Program Results

Program Results (f11mmfe.r)

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