naginterfaces.library.ode.ivp_2nd_rkn_setup¶
- naginterfaces.library.ode.ivp_2nd_rkn_setup(h, tol, thres, thresp, maxstp, start, onestp, high, comm)[source]¶
ivp_2nd_rkn_setup
is a setup function which must be called prior to the first call of the integratorivp_2nd_rkn()
and may be called prior to any continuation call toivp_2nd_rkn()
.For full information please refer to the NAG Library document for d02lx
https://www.nag.com/numeric/nl/nagdoc_29.2/flhtml/d02/d02lxf.html
- Parameters
- hfloat
If , may specify an initial step size to be attempted in
ivp_2nd_rkn()
.If , may specify a step size to override the choice of next step attempted made internally to
ivp_2nd_rkn()
.The sign of is not important, as the absolute value of is chosen and the appropriate sign is selected by
ivp_2nd_rkn()
.If this option is not required then you must set .
- tolfloat
Must be set to a relative tolerance for controlling the error in the integration by
ivp_2nd_rkn()
.ivp_2nd_rkn()
has been designed so that, for most problems, a reduction in leads to an approximately proportional reduction in the error in the solution. However the actual relation between and the accuracy of the solution cannot be guaranteed. You are strongly recommended to repeat the integration with a smaller value of and compare the results. See the description of and for further details of how is used.- thresfloat, array-like, shape
and may be set to thresholds for use in the error control of
ivp_2nd_rkn()
. At each step in the numerical integration estimates of the local errors and in the solution, , and its derivative, , respectively are computed, for . For the step to be accepted conditions of the following type must be satisfied:If one or both of these is not satisfied then the step size is reduced and the solution is recomputed.
If on entry, a value of is used for , for , where is machine precision.
Similarly for .
- threspfloat, array-like, shape
and may be set to thresholds for use in the error control of
ivp_2nd_rkn()
. At each step in the numerical integration estimates of the local errors and in the solution, , and its derivative, , respectively are computed, for . For the step to be accepted conditions of the following type must be satisfied:If one or both of these is not satisfied then the step size is reduced and the solution is recomputed.
If on entry, a value of is used for , for , where is machine precision.
Similarly for .
- maxstpint
A bound on the number of steps attempted in any one call of
ivp_2nd_rkn()
.If on entry, a value of is used.
- startbool
Specifies whether or not the call of
ivp_2nd_rkn()
is for a new problem. indicates that a new problem is to be solved. indicates the call ofivp_2nd_rkn_setup
is prior to a continuation call ofivp_2nd_rkn()
.- onestpbool
The mode of operation for
ivp_2nd_rkn()
.ivp_2nd_rkn()
will operate in one-step mode, that is it will return after each successful step.ivp_2nd_rkn()
will operate in interval mode, that is it will return at the end of the integration interval.- highbool
If , a high-order method will be used, whereas if , a low-order method will be used. (See the specification of
ivp_2nd_rkn()
for further details.)- commdict, communication object, modified in place
Communication structure.
On initial entry: need not be set.
- Returns
- startbool
.
- Raises
- NagValueError
- (errno )
On entry, is not positive.
- (errno )
On entry, is not positive.
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, and .
Constraint: if then .
- (errno )
On entry, and .
Constraint: if then .
- (errno )
On entry, .
Constraint: .
- Notes
No equivalent traditional C interface for this routine exists in the NAG Library.
ivp_2nd_rkn_setup
permits you to set optional inputs prior to any call ofivp_2nd_rkn()
. It must be called before the first call of functionivp_2nd_rkn()
and it may be called before any continuation call of functionivp_2nd_rkn()
.