D02NTF (PDF version)
D02 Chapter Contents
D02 Chapter Introduction
NAG Library Manual

NAG Library Routine Document

D02NTF

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.

+ Contents

    1  Purpose
    7  Accuracy
    9  Example

1  Purpose

D02NTF is a setup routine which you must call prior to an integrator in sub-chapter D02M–N, if banded matrix linear algebra is required.

2  Specification

SUBROUTINE D02NTF ( NEQ, NEQMAX, JCEVAL, ML, MU, NWKJAC, NJCPVT, RWORK, IFAIL)
INTEGER  NEQ, NEQMAX, ML, MU, NWKJAC, NJCPVT, IFAIL
REAL (KIND=nag_wp)  RWORK(50+4*NEQMAX)
CHARACTER(1)  JCEVAL

3  Description

D02NTF defines the linear algebra to be used as banded matrix linear algebra, permits you to specify the method for calculating the Jacobian and checks the validity of certain input values.

4  References

See the D02M–N sub-chapter Introduction.

5  Parameters

1:     NEQ – INTEGERInput
On entry: the number of differential equations.
Constraint: 1NEQNEQMAX.
2:     NEQMAX – INTEGERInput
On entry: a bound on the maximum number of differential equations to be solved during the integration.
Constraint: NEQMAXNEQ.
3:     JCEVAL – CHARACTER(1)Input
On entry: specifies the technique to be used to compute the Jacobian as follows:
JCEVAL='N'
The Jacobian is to be evaluated numerically by the integrator. If this option is used, then the actual argument corresponding to JAC in the call to D02NCF or D02NHF must be either D02NCZ or D02NHZ respectively.
JCEVAL='A'
You must supply a (sub)program to evaluate the Jacobian on a call to the integrator.
JCEVAL='D'
The default choice is to be made. In this case 'D' is interpreted as 'N'.
Only the first character of the actual parameter JCEVAL is passed to D02NTF; hence it is permissible for the actual argument to be more descriptive, e.g., ‘Numerical’, ‘Analytical’ or ‘Default’, on a call to D02NTF.
Constraint: JCEVAL='N', 'A' or 'D'.
4:     ML – INTEGERInput
On entry: mL, the number of subdiagonals in the band.
Constraint: 0MLNEQ-1.
5:     MU – INTEGERInput
On entry: mU, the number of superdiagonals in the band.
Constraint: 0MUNEQ-1.
6:     NWKJAC – INTEGERInput
On entry: the size of the workspace array WKJAC, which you are supplying to the integrator, as declared in the (sub)program from which D02NTF is called.
Constraint: NWKJAC2×ML+MU+1×NEQMAX.
7:     NJCPVT – INTEGERInput
On entry: the size of the workspace array JACPVT, which you are supplying to the integrator, as declared in the (sub)program from which D02NTF is called.
Constraint: NJCPVTNEQMAX.
8:     RWORK(50+4×NEQMAX) – REAL (KIND=nag_wp) arrayCommunication Array
This must be the same workspace array as the array RWORK supplied to the integrator. It is used to pass information from the setup routine to the integrator and therefore the contents of this array must not be changed before calling the integrator.
9:     IFAIL – INTEGERInput/Output
On entry: IFAIL must be set to 0, -1​ 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​ 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 -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,JCEVAL'N', 'A' or 'D',
orNEQ<1,
orML<0 or ML>NEQ-1,
orMU<0 or MU>NEQ-1,
orNEQ>NEQMAX,
orNJCPVT<NEQMAX,
orNWKJAC<2×ML+MU+1×NEQMAX.

7  Accuracy

Not applicable.

8  Further Comments

D02NTF must be called as a setup routine before a call to either D02NCF or D02NHF and may be called as the linear algebra setup routine before a call to either D02NMF or D02NNF.

9  Example

See Section 9 in D02NCF and D02NHF.

D02NTF (PDF version)
D02 Chapter Contents
D02 Chapter Introduction
NAG Library Manual

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