# NAG FL Interfacef11mmf (direct_​real_​gen_​diag)

## ▸▿ Contents

Settings help

FL Name Style:

FL Specification Language:

## 1Purpose

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

## 2Specification

Fortran Interface
 Subroutine f11mmf ( n, a, iprm, il, lval, iu, uval, rpg,
 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
#include <nag.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)
The routine may be called by the names f11mmf or nagf_sparse_direct_real_gen_diag.

## 3Description

f11mmf computes the reciprocal pivot growth factor ${\mathrm{max}}_{j}\left({‖{A}_{j}‖}_{\infty }/{‖{U}_{j}‖}_{\infty }\right)$ from the columns ${A}_{j}$ and ${U}_{j}$ of an $LU$ factorization of the matrix $A$, ${P}_{r}A{P}_{c}=LU$ where ${P}_{r}$ is a row permutation matrix, ${P}_{c}$ is a column permutation matrix, $L$ is unit lower triangular and $U$ is upper triangular as computed by f11mef.

None.

## 5Arguments

1: $\mathbf{n}$Integer Input
On entry: $n$, the order of the matrix $A$.
Constraint: ${\mathbf{n}}\ge 0$.
2: $\mathbf{icolzp}\left(*\right)$Integer array Input
Note: the dimension of the array icolzp must be at least ${\mathbf{n}}+1$.
On entry: the new column index array of sparse matrix $A$. See Section 2.1.3 in the F11 Chapter Introduction.
3: $\mathbf{a}\left(*\right)$Real (Kind=nag_wp) array Input
Note: the dimension of the array a must be at least ${\mathbf{icolzp}}\left({\mathbf{n}}+1\right)-1$, the number of nonzeros of the sparse matrix $A$.
On entry: the array of nonzero values in the sparse matrix $A$.
4: $\mathbf{iprm}\left(7×{\mathbf{n}}\right)$Integer array Input
On entry: the column permutation which defines ${P}_{c}$, the row permutation which defines ${P}_{r}$, plus associated data structures as computed by f11mef.
5: $\mathbf{il}\left(*\right)$Integer array Input
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: $\mathbf{lval}\left(*\right)$Real (Kind=nag_wp) array Input
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: $\mathbf{iu}\left(*\right)$Integer array Input
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: $\mathbf{uval}\left(*\right)$Real (Kind=nag_wp) array Input
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: $\mathbf{rpg}$Real (Kind=nag_wp) Output
On exit: the reciprocal pivot growth factor ${\mathrm{max}}_{j}\left({‖{A}_{j}‖}_{\infty }/{‖{U}_{j}‖}_{\infty }\right)$. If the reciprocal pivot growth factor is much less than $1$, the stability of the $LU$ factorization may be poor.
10: $\mathbf{ifail}$Integer Input/Output
On entry: ifail must be set to $0$, $-1$ or $1$ to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of $0$ causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of $-1$ means that an error message is printed while a value of $1$ means that it is not.
If halting is not appropriate, the value $-1$ or $1$ is recommended. If message printing is undesirable, then the value $1$ is recommended. Otherwise, the value $0$ is recommended. When the value $-\mathbf{1}$ 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).

## 6Error Indicators and Warnings

If on entry ${\mathbf{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:
${\mathbf{ifail}}=1$
On entry, ${\mathbf{n}}=⟨\mathit{\text{value}}⟩$.
Constraint: ${\mathbf{n}}\ge 0$.
${\mathbf{ifail}}=2$
Incorrect column permutations in array iprm.
${\mathbf{ifail}}=-99$
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
${\mathbf{ifail}}=-399$
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
${\mathbf{ifail}}=-999$
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.

Not applicable.

## 8Parallelism and Performance

f11mmf is not threaded in any implementation.

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.

## 10Example

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.1Program Text

Program Text (f11mmfe.f90)

### 10.2Program Data

Program Data (f11mmfe.d)

### 10.3Program Results

Program Results (f11mmfe.r)