NAG FL Interface
d01rcf (dim1_​gen_​vec_​multi_​dimreq)

Settings help

FL Name Style:


FL Specification Language:


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

Fortran Interface
Subroutine d01rcf ( ni, lenxrq, ldfmrq, sdfmrq, licmin, licmax, lcmin, lcmax, iopts, opts, ifail)
Integer, Intent (In) :: ni, iopts(*)
Integer, Intent (Inout) :: ifail
Integer, Intent (Out) :: lenxrq, ldfmrq, sdfmrq, licmin, licmax, lcmin, lcmax
Real (Kind=nag_wp), Intent (In) :: opts(*)
C Header Interface
#include <nag.h>
void  d01rcf_ (const Integer *ni, Integer *lenxrq, Integer *ldfmrq, Integer *sdfmrq, Integer *licmin, Integer *licmax, Integer *lcmin, Integer *lcmax, const Integer iopts[], const double opts[], Integer *ifail)
The routine may be called by the names d01rcf or nagf_quad_dim1_gen_vec_multi_dimreq.

3 Description

d01rcf returns the minimum dimension of the arrays x (lenxrq), fm (ldfmrq×sdfmrq), icom (licmin) and com (lcmin) 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 licmax and lcmax for the dimension of the arrays icom and com, that could possibly be required with the chosen options.
All the minimum values lenxrq, ldfmrq, sdfmrq, licmin and lcmin, and subsequently all the maximum values licmax and 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.

4 References

None.

5 Arguments

1: ni Integer Input
On entry: ni, the number of integrals which will be approximated in the subsequent call to d01raf.
Constraint: ni>0.
2: lenxrq Integer Output
On exit: lenxrq, the minimum dimension of the array x that can be used in a subsequent call to d01raf.
3: ldfmrq Integer Output
On exit: ldfmrq, the minimum leading dimension of the array fm that can be used in a subsequent call to d01raf.
4: sdfmrq Integer Output
On exit: sdfmrq, the minimum second dimension of the array fm that can be used in a subsequent call to d01raf.
Note: the minimum dimension of the array fm is ldfmrq×sdfmrq.
5: licmin Integer Output
On exit: licmin, the minimum dimension of the array icom that must be passed to d01raf to enable it to calculate a single approximation to all the ni integrals over the interval [a,b] with spri initial segments.
6: licmax Integer Output
On exit: licmax the dimension of the array icom that must be passed to d01raf to enable it to exhaust the adaptive process controlled by the currently set options for the ni integrals over the interval [a,b] with spri initial segments.
7: lcmin Integer Output
On exit: lcmin, the minimum dimension of the array com that must be passed to d01raf to enable it to calculate a single approximation to all the ni integrals over the interval [a,b] with spri initial segments.
8: lcmax Integer Output
On exit: lcmax, the dimension of the array com that must be passed to d01raf to enable it to exhaust the adaptive process controlled by the currently set options for the ni integrals over the interval [a,b] with spri initial segments.
9: iopts(*) Integer array Communication Array
Note: the dimension of this array is dictated by the requirements of associated functions that must have been previously called. This array must be the same array passed as argument iopts in the previous call to d01zkf.
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(*) Real (Kind=nag_wp) array Communication Array
Note: the dimension of this array is dictated by the requirements of associated functions that must have been previously called. This array must be the same array passed as argument opts in the previous call to d01zkf.
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 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 -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=21
On entry, ni=value.
Constraint: ni>0.
ifail=1001
One of the option arrays iopts or opts has become corrupted. Re-initialize the arrays using d01zkf.
ifail=-99
An unexpected error has been triggered by this routine. Please contact NAG.
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
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.
ifail=-999
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.

7 Accuracy

Not applicable.

8 Parallelism and Performance

d01rcf is not threaded in any implementation.

9 Further Comments

None.

10 Example

See d01raf for examples of the usage of d01rcf.