NAG CL Interface
f11mmc (direct_​real_​gen_​diag)

Settings help

CL Name Style:


1 Purpose

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

2 Specification

#include <nag.h>
void  f11mmc (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, NagError *fail)
The function may be called by the names: f11mmc, nag_sparse_direct_real_gen_diag or nag_superlu_diagnostic_lu.

3 Description

f11mmc computes the reciprocal pivot growth factor maxj(Aj/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 f11mec.

4 References

None.

5 Arguments

1: n Integer Input
On entry: n, the order of the matrix A.
Constraint: n0.
2: icolzp[dim] const Integer Input
Note: the dimension, dim, of the array icolzp must be at least n+1.
On entry: the new column index array of sparse matrix A. See Section 2.1.3 in the F11 Chapter Introduction.
3: a[dim] const double Input
Note: the dimension, dim, of the array a must be at least icolzp[n]-1, the number of nonzeros of the sparse matrix A.
On entry: the array of nonzero values in the sparse matrix A.
4: iprm[7×n] const Integer Input
On entry: the column permutation which defines Pc, the row permutation which defines Pr, plus associated data structures as computed by f11mec.
5: il[dim] const Integer Input
Note: the dimension, dim, of the array il must be at least as large as the dimension of the array of the same name in f11mec.
On entry: records the sparsity pattern of matrix L as computed by f11mec.
6: lval[dim] const double Input
Note: the dimension, dim, of the array lval must be at least as large as the dimension of the array of the same name in f11mec.
On entry: records the nonzero values of matrix L and some nonzero values of matrix U as computed by f11mec.
7: iu[dim] const Integer Input
Note: the dimension, dim, of the array iu must be at least as large as the dimension of the array of the same name in f11mec.
On entry: records the sparsity pattern of matrix U as computed by f11mec.
8: uval[dim] const double Input
Note: the dimension, dim, of the array uval must be at least as large as the dimension of the array of the same name in f11mec.
On entry: records some nonzero values of matrix U as computed by f11mec.
9: rpg double * Output
On exit: the reciprocal pivot growth factor maxj(Aj/Uj). If the reciprocal pivot growth factor is much less than 1, the stability of the LU factorization may be poor.
10: fail NagError * Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).

6 Error Indicators and Warnings

NE_ALLOC_FAIL
Dynamic memory allocation failed.
See Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
NE_BAD_PARAM
On entry, argument value had an illegal value.
NE_INT
On entry, n=value.
Constraint: n0.
NE_INTERNAL_ERROR
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.
See Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
NE_INVALID_PERM_COL
Incorrect column permutations in array iprm.
NE_NO_LICENCE
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library CL Interface for further information.

7 Accuracy

Not applicable.

8 Parallelism and Performance

Background information to multithreading can be found in the Multithreading documentation.
f11mmc 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 f11mec.

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 (f11mmce.c)

10.2 Program Data

Program Data (f11mmce.d)

10.3 Program Results

Program Results (f11mmce.r)