D01 Chapter Contents
D01 Chapter Introduction
NAG Library Manual

# NAG Library Routine DocumentD01RCF

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

The dimension of the arrays that must be passed as actual arguments to D01RAF are dependent upon a number of factors. D01RCF returns the correct size of these arrays enabling D01RAF to be called successfully.

## 2  Specification

 SUBROUTINE D01RCF ( NI, LENXRQ, LDFMRQ, SDFMRQ, LICMIN, LICMAX, LCMIN, LCMAX, IOPTS, OPTS, IFAIL)
 INTEGER NI, LENXRQ, LDFMRQ, SDFMRQ, LICMIN, LICMAX, LCMIN, LCMAX, IOPTS(100), IFAIL REAL (KIND=nag_wp) OPTS(100)

## 3  Description

D01RCF returns the minimum dimension of the arrays X, FM, ICOMM and COMM that must be passed to D01RAF to enable the integration to commence given options currently set for the NI integrands. D01RCF also returns the upper bounds $\mathit{licmax}$ and $\mathit{lcmax}$ for the dimension of the arrays ICOMM and COMM, that could possibly be required with the chosen options.
All the minimum values $\mathit{lenxrq}$, $\mathit{ldfmrq}$, $\mathit{sdfmrq}$, $\mathit{licmin}$ and $\mathit{lcmin}$, and subsequently all the maximum values $\mathit{licmax}$ and $\mathit{lcmax}$ may be affected if different options are set, and hence D01RCF should be called after any options are set, and before the first call to D01RAF.
A segment is here defined as a (possibly maximal) subset of the domain of integration. During subdivision, a segment is bisected into two new segments.

None.

## 5  Parameters

1:     NI – INTEGERInput
On entry: ${n}_{i}$, the number of integrals which will be approximated in the subsequent call to D01RAF.
Constraint: ${\mathbf{NI}}>0$.
2:     LENXRQ – INTEGEROutput
On exit: $\mathit{lenxrq}$, the minimum dimension of the array X that can be used in a subsequent call to D01RAF.
3:     LDFMRQ – INTEGEROutput
On exit: $\mathit{ldfmrq}$, the minimum leading dimension of the array FM that can be used in a subsequent call to D01RAF.
4:     SDFMRQ – INTEGEROutput
On exit: $\mathit{sdfmrq}$, the minimum second dimension of the array FM than can be used in a subsequent call to D01RAF.
5:     LICMIN – INTEGEROutput
On exit: $\mathit{licmin}$, the minimum dimension of the array ICOMM that must be passed to D01RAF to enable it to calculate a single approximation to all the ${n}_{i}$ integrals over the interval $\left[a,b\right]$ with ${s}_{\mathit{pri}}$ initial segments.
6:     LICMAX – INTEGEROutput
On exit: $\mathit{licmax}$ the dimension of the array ICOMM that must be passed to D01RAF to enable it to exhaust the adaptive process controlled by the currently set options for the ${n}_{i}$ integrals over the interval $\left[a,b\right]$ with ${s}_{\mathit{pri}}$ initial segments.
7:     LCMIN – INTEGEROutput
On exit: $\mathit{lcmin}$, the minimum dimension of the array COMM that must be passed to D01RAF to enable it to calculate a single approximation to all the ${n}_{i}$ integrals over the interval $\left[a,b\right]$ with ${s}_{\mathit{pri}}$ initial segments.
8:     LCMAX – INTEGEROutput
On exit: $\mathit{lcmax}$, the dimension of the array COMM that must be passed to D01RAF to enable it to exhaust the adaptive process controlled by the currently set options for the ${n}_{i}$ integrals over the interval $\left[a,b\right]$ with ${s}_{\mathit{pri}}$ initial segments.
9:     IOPTS($100$) – INTEGER arrayInput
On entry: the integer option array as returned by D01ZKF.
Constraint: IOPTS must not be changed between calls to D01ZKF, D01ZLF, D01RCF and D01RAF.
10:   OPTS($100$) – REAL (KIND=nag_wp) arrayInput
On entry: the real option array as returned by D01ZKF.
Constraint: OPTS must not be changed between calls to D01ZKF, D01ZLF, D01RCF and D01RAF.
11:   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}}=21$
On entry, ${\mathbf{NI}}=⟨\mathit{\text{value}}⟩$.
Constraint: ${\mathbf{NI}}>0$.
${\mathbf{IFAIL}}=1001$
One of the option arrays IOPTS or OPTS has become corrupted. Re-initialize the arrays using D01ZKF.

Not applicable.