D02 Chapter Contents
D02 Chapter Introduction
NAG Library Manual

# NAG Library Routine DocumentD02NPF

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

D02NPF is a setup routine which you must call prior to D02NEF and after a call to D02MWF, if the Jacobian is to be considered as having a banded structure.

## 2  Specification

 SUBROUTINE D02NPF ( NEQ, ML, MU, ICOM, LICOM, IFAIL)
 INTEGER NEQ, ML, MU, ICOM(LICOM), LICOM, IFAIL

## 3  Description

A call to D02NPF specifies that the Jacobian to be used is banded in structure. If D02NPF is not called before a call to D02NEF then the Jacobian is assumed to be full.

None.

## 5  Parameters

1:     NEQ – INTEGERInput
On entry: the number of differential-algebraic equations to be solved.
Constraint: $1\le {\mathbf{NEQ}}$.
2:     ML – INTEGERInput
On entry: ${m}_{L}$, the number of subdiagonals in the band.
Constraint: $0\le {\mathbf{ML}}\le {\mathbf{NEQ}}-1$.
3:     MU – INTEGERInput
On entry: ${m}_{U}$, the number of superdiagonals in the band.
Constraint: $0\le {\mathbf{MU}}\le {\mathbf{NEQ}}-1$.
4:     ICOM(LICOM) – INTEGER arrayCommunication Array
ICOM is used to communicate details of the integration from D02MWF and details of the banded structure of the Jacobian to D02NEF.
5:     LICOM – INTEGERInput
On entry: the dimension of the array ICOM as declared in the (sub)program from which D02NPF is called.
Constraint: ${\mathbf{LICOM}}\ge 50+{\mathbf{NEQ}}$.
6:     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{NEQ}}<1$.
${\mathbf{IFAIL}}=2$
 On entry, ${\mathbf{ML}}<0$ or ${\mathbf{ML}}>{\mathbf{NEQ}}-1$.
${\mathbf{IFAIL}}=3$
 On entry, ${\mathbf{MU}}<0$ or ${\mathbf{MU}}>{\mathbf{NEQ}}-1$.
${\mathbf{IFAIL}}=4$
Either D02MWF has not been called before this call or the communication array ICOM has been corrupted.
${\mathbf{IFAIL}}=5$
 On entry, ${\mathbf{LICOM}}<50+{\mathbf{NEQ}}$.

Not applicable.