naginterfaces.library.ode.ivp_​adams_​setup

naginterfaces.library.ode.ivp_adams_setup(statef, neqf, vectol, atol, rtol, onestp, crit, tcrit, hmax, maxstp, neqg, alterg, sophst, comm)[source]

ivp_adams_setup is a setup function which must be called prior to the first call of either of the integrators ivp_adams_roots() and ivp_adams_roots_revcom() and may be called prior to any continuation call to these functions.

For full information please refer to the NAG Library document for d02qw

https://www.nag.com/numeric/nl/nagdoc_28.5/flhtml/d02/d02qwf.html

Parameters
statefstr, length 1

Specifies whether the integration function (ivp_adams_roots() or ivp_adams_roots_revcom()) is to start a new system of ordinary differential equations, restart a system or continue with a system.

Start integration with a new differential system.

Restart integration with the current differential system.

Continue integration with the current differential system.

neqfint

The number of ordinary differential equations to be solved by the integration function. must remain unchanged on subsequent calls to ivp_adams_setup with or .

vectolbool

Specifies whether vector or scalar error control is to be employed for the local error test in the integration.

If , vector error control will be used and you must specify values of and , for .

Otherwise scalar error control will be used and you must specify values of just and .

The error test to be satisfied is of the form

where is defined as follows:

and is an estimate of the local error in , computed internally. must remain unchanged on subsequent calls to ivp_adams_setup with or .

atolfloat, array-like, shape

The absolute local error tolerance (see ).

rtolfloat, array-like, shape

The relative local error tolerance (see ).

onestpbool

The mode of operation of the integration function. If , the integration function will operate in one-step mode, that is it will return after each successful step. Otherwise the integration function will operate in interval mode, that is it will return at the end of the integration interval.

critbool

Specifies whether or not there is a value for the independent variable beyond which integration is not to be attempted. Setting indicates that there is such a point, whereas indicates that there is no such restriction.

tcritfloat

With , must be set to a value of the independent variable beyond which integration is not to be attempted. Otherwise is not referenced.

hmaxfloat

If , a bound on the absolute step size during the integration is taken to be .

If , no bound is assumed on the step size during the integration.

A bound may be required if there are features of the solution on very short ranges of integration which may be missed.

You should try first.

Note: this argument only affects the step size if the option is being used.

maxstpint

A bound on the number of attempted steps in any one call to the integration function. If on entry, a value of is used.

neqgint

Specifies whether or not root-finding is required in ivp_adams_roots() or ivp_adams_roots_revcom().

No root-finding is attempted.

Root-finding is required and event functions will be specified for the integration function.

altergbool

Specifies whether or not the event functions have been redefined. need not be set if . On subsequent calls to ivp_adams_setup, if has been set positive, specifies that the event functions remain unchanged, whereas specifies that the event functions have changed. Because of the expense in reinitializing the root searching procedure, should be set to only if the event functions really have been altered. need not be set if the root-finding option is not used.

sophstbool

The type of search technique to be used in the root-finding. If then a sophisticated and reliable but expensive technique will be used, whereas for a simple but less reliable technique will be used. If , is not referenced.

commdict, communication object, modified in place

Communication structure.

On initial entry: need not be set.

Returns
statefstr, length 1

Is set to ‘C’, except that if an error is detected, is unchanged.

altergbool

Is set to .

Raises
NagValueError
(errno )

On entry, .

Constraint: , or .

(errno )

On entry, for , , and .

Constraint: if then for all .

(errno )

On entry, .

Constraint: for all .

(errno )

On entry, .

Constraint: for all .

(errno )

On entry, or , and .

Constraint: if or and then must retain its value from the prior call with .

(errno )

On entry, or and .

Constraint: if or then must retain its value from the prior call with .

(errno )

On entry, or and .

Constraint: if or then must retain its value from the prior call with .

(errno )

On entry, or and .

Constraint: if or then must retain its value, , from the prior call with .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, , and .

Constraint: if then .

(errno )

On entry, , and .

Constraint: if then .

(errno )

On entry, .

Constraint: .

Notes

In the NAG Library the traditional C interface for this routine uses a different algorithmic base. Please contact NAG if you have any questions about compatibility.

ivp_adams_setup permits initialization of the integration method and setting of optional inputs prior to any call of ivp_adams_roots() or ivp_adams_roots_revcom(). It must be called before the first call of either of the functions ivp_adams_roots() or ivp_adams_roots_revcom() and it may be called before any continuation call of either of the functions ivp_adams_roots() or ivp_adams_roots_revcom().