d01zkf either initializes or resets the optional parameter arrays or sets a single optional parameter for supported problem solving routines in Chapter D01.
The routine may be called by the names d01zkf or nagf_quad_opt_set.
3Description
d01zkf has three purposes: to initialize optional parameter arrays; to reset all optional parameters to their default values; or to set a single optional parameter to a user-supplied value.
Optional parameters and their values are, in general, presented as a character string, optstr, of the form ‘’; alphabetic characters can be supplied in either upper or lower case. Both and may consist of one or more tokens separated by white space. The tokens that comprise will normally be either an integer, real or character value as defined in the description of the specific optional argument. In addition all optional parameters can take an DEFAULT which resets the optional parameter to its default value.
It is imperative that optional parameter arrays are initialized before any options are set, before the relevant problem solving routine is called and before any options are queried using d01zlf.
To initialize the optional parameter arrays iopts and opts for a specific problem solving routine, the option Initialize is used with identifying the problem solving routine to be called. For example, to initialize the optional parameter arrays to be passed to d01raf and its associated routine d01rcf, d01zkf is called as follows:
Note that the routine name may be abbreviated to just the first five letters of the ‘short’ name, or by omitting the nagf_ or quad_ prefixes of the ‘long’ name. So the above may be equivalently specified as 'Initialize = d01ra' or 'Initialize = dim1_gen_vec_multi_rcomm'.
The available option names and their corresponding valid values are given in Section 11 in d01esfandd01raf.
4References
None.
5Arguments
1: – Character(*)Input
On entry: a string identifying the option to be set.
Initialize the optional parameter arrays iopts and opts for use with routine , where is the name associated with the routine of interest.
Resets all options to their default values.
See Section 11 in d01esfandd01raf for details of valid values for and . The equals sign () delimiter must be used to separate the from its value.
optstr is case insensitive. Each token in the and component must be separated by at least one space.
2: – Integer arrayCommunication Array
On entry: optional parameter array.
If optstr has the form , the contents of iopts need not be set.
Otherwise, ioptsmust not have been altered since the last call to d01zkf, d01zlf or the selected problem solving routine.
On exit: dependent on the contents of optstr, either an initialized, reset or updated version of the optional parameter array.
Constraint:
unless otherwise stated in the documentation for a specific, supported, problem solving routine,.
6: – IntegerInput/Output
On entry: ifail must be set to , or to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of means that an error message is printed while a value of means that it is not.
If halting is not appropriate, the value or is recommended. If message printing is undesirable, then the value is recommended. Otherwise, the value is recommended. When the value or is used it is essential to test the value of ifail on exit.
On exit: unless the routine detects an error or a warning has been flagged (see Section 6).
6Error Indicators and Warnings
If on entry or , explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
On entry, the optional parameter in optstr was not recognized: .
On entry, the expected delimiter ‘’ was not found in optstr: .
On entry, could not convert the specified to an integer: .
On entry, could not convert the specified to a real: .
On entry, attempting to initialize the optional parameter arrays but specified routine name was not valid: .
On entry, the supplied for the integer optional parameter is not valid. .
On entry, the supplied for the real optional parameter is not valid. .
On entry, the supplied for the character optional parameter is not valid. .
On entry, either the option arrays have not been initialized or they have been corrupted.
On entry, . Constraint: .
On entry, . Constraint: .
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.
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.
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.
7Accuracy
Not applicable.
8Parallelism and Performance
d01zkf is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the Users' Note for your implementation for any additional implementation-specific information.
9Further Comments
For suites of routines that share the same option arrays, the option arrays must be initialized using the primary (driver) routine name. For example for routines d01rafandd01rcf, the option arrays must be initialized for d01raf.
When encoding integer valued options in optstr, the integer must be written as an explicit integer. For example,
"Maximum Subdivisions = 12" is acceptable, whereas
"Maximum Subdivisions = 12.0" and
"Maximum Subdivisions = 0.12E2"
are not.
When encoding real valued options in optstr, the may be integral if appropriate. For example,
"Absolute Tolerance = 10",
"Absolute Tolerance = 10.0" and
"Absolute Tolerance = 1.0E1"
are all acceptable.
10Example
See the example programs associated with the problem solving routine you wish to use for a demonstration of how to use d01zkf to initialize option arrays and set options.