# NAG Library Routine Document

## 1Purpose

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.

## 2Specification

Fortran Interface
 Subroutine d02npf ( neq, ml, mu, icom,
 Integer, Intent (In) :: neq, ml, mu, licom Integer, Intent (Inout) :: icom(licom), ifail
#include nagmk26.h
 void d02npf_ (const Integer *neq, const Integer *ml, const Integer *mu, Integer icom[], const Integer *licom, Integer *ifail)

## 3Description

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.

## 5Arguments

1:     $\mathbf{neq}$ – IntegerInput
On entry: the number of differential-algebraic equations to be solved.
Constraint: $1\le {\mathbf{neq}}$.
2:     $\mathbf{ml}$ – IntegerInput
On entry: ${m}_{L}$, the number of subdiagonals in the band.
Constraint: $0\le {\mathbf{ml}}\le {\mathbf{neq}}-1$.
3:     $\mathbf{mu}$ – IntegerInput
On entry: ${m}_{U}$, the number of superdiagonals in the band.
Constraint: $0\le {\mathbf{mu}}\le {\mathbf{neq}}-1$.
4:     $\mathbf{icom}\left({\mathbf{licom}}\right)$ – 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:     $\mathbf{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:     $\mathbf{ifail}$ – IntegerInput/Output
On entry: ifail must be set to $0$, $-1\text{​ 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\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 argument, 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).

## 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{neq}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{neq}}\ge 1$.
${\mathbf{ifail}}=2$
On entry, ${\mathbf{ml}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{ml}}\ge 0$.
On entry, ${\mathbf{ml}}=〈\mathit{\text{value}}〉$ and ${\mathbf{neq}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{ml}}\le {\mathbf{neq}}-1$.
${\mathbf{ifail}}=3$
On entry, ${\mathbf{mu}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{mu}}\ge 0$.
On entry, ${\mathbf{mu}}=〈\mathit{\text{value}}〉$ and ${\mathbf{neq}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{mu}}\le {\mathbf{neq}}-1$.
${\mathbf{ifail}}=4$
Either the initialization routine has not been called prior to the first call of this routine or the communication array has become corrupted.
${\mathbf{ifail}}=5$
On entry, licom is too small: ${\mathbf{licom}}=〈\mathit{\text{value}}〉$.
${\mathbf{ifail}}=-99$
See Section 3.9 in How to Use the NAG Library and its Documentation for further information.
${\mathbf{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.
${\mathbf{ifail}}=-999$
Dynamic memory allocation failed.
See Section 3.7 in How to Use the NAG Library and its Documentation for further information.

Not applicable.

## 8Parallelism and Performance

d02npf is not threaded in any implementation.