nag_quad_opt_set (d01zkc) either initializes or resets the optional parameter arrays or sets a single optional parameter for supported problem solving functions in
Chapter d01.
Optional parameters and their values are, in general, presented as a character string,
optstr, of the form ‘
option ’; alphabetic characters can be supplied in either upper or lower case. Both
option 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 function is called and before any options are queried using
nag_quad_opt_get (d01zlc). To initialize the optional parameter arrays
iopts and
opts for a specific problem solving function, the option
Initialize is used with
optval identifying the problem solving function to be called. For example, to initialize the optional parameter arrays to be passed to
nag_quad_1d_gen_vec_multi_rcomm (d01rac) and its associated function
nag_quad_1d_gen_vec_multi_dimreq (d01rcc),
nag_quad_opt_set (d01zkc) is called as follows:
nag_quad_opt_set("Initialize = d01rac", iopts, liopts, opts, lopts, &fail)
The available option names and their corresponding valid values are given in Section 11 in
nag_quad_md_sgq_multi_vec (d01esc) and
nag_quad_1d_gen_vec_multi_rcomm (d01rac).
None.
- NE_ALLOC_FAIL
-
Dynamic memory allocation failed.
See
Section 2.3.1.2 in How to Use the NAG Library and its Documentation for further information.
- NE_BAD_PARAM
-
On entry, argument had an illegal value.
- NE_INT
-
On entry, .
Constraint: .
On entry, .
Constraint: .
- NE_INTERNAL_ERROR
-
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact
NAG for assistance.
See
Section 2.7.6 in How to Use the NAG Library and its Documentation for further information.
- NE_INVALID_FORMAT
-
On entry, could not convert the specified optval to an integer: .
On entry, could not convert the specified optval to a real: .
On entry, the expected delimiter ‘
’ was not found in
optstr:
.
- NE_INVALID_OPTION
-
On entry, either the option arrays have not been initialized or they have been corrupted.
On entry, the optional parameter in
optstr was not recognized:
.
- NE_INVALID_VALUE
-
On entry, the optval supplied for the character optional parameter is not valid.
.
On entry, the optval supplied for the integer optional parameter is not valid.
.
On entry, the optval supplied for the real optional parameter is not valid.
.
- NE_NO_LICENCE
-
Your licence key may have expired or may not have been installed correctly.
See
Section 2.7.5 in How to Use the NAG Library and its Documentation for further information.
- NE_NOT_FUN_NAME
-
On entry, attempting to initialize the optional parameter arrays but specified function name was not valid: .
Not applicable.
Please consult the
x06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this function. Please also consult the
Users' Note for your implementation for any additional implementation-specific information.
For suites of functions that share the same option arrays, the option arrays must be initialized using the primary (driver) function name. For example for functions
nag_quad_1d_gen_vec_multi_rcomm (d01rac) and
nag_quad_1d_gen_vec_multi_dimreq (d01rcc), the option arrays must be initialized for
nag_quad_1d_gen_vec_multi_rcomm (d01rac).
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.
See the example programs associated with the problem solving function you wish to use for a demonstration of how to use nag_quad_opt_set (d01zkc) to initialize option arrays and set options.