naginterfaces.library.ode.ivp_​stiff_​bdf

naginterfaces.library.ode.ivp_stiff_bdf(neqmax, sdysav, maxord, method, petzld, con, tcrit, hmin, hmax, h0, maxstp, mxhnil, norm)[source]

ivp_stiff_bdf is a setup function which must be called prior to linear algebra setup functions and integrators from the SPRINT suite of functions, if Backward Differentiation Formulae (BDF) are to be used.

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

https://www.nag.com/numeric/nl/nagdoc_28.6/flhtml/d02/d02nvf.html

Parameters
neqmaxint

A bound on the maximum number of differential equations to be solved.

sdysavint

The second dimension of the array that will be supplied to the integrator, as declared in the (sub)program from which the integrator is called.

maxordint

The maximum order to be used for the BDF method.

methodstr, length 1

Specifies the method to be used to solve the system of nonlinear equations arising on each step of the BDF code.

A modified Newton iteration is used.

Functional iteration is used.

A modified Newton iteration is used.

Note: a linear algebra setup function must be called even when using functional iteration, since if difficulty is encountered a switch is made to a modified Newton method.

Only the first character of the actual argument is passed to ivp_stiff_bdf; hence it is permissible for the actual argument to be more descriptive e.g., ‘Newton’, ‘Functional iteration’ or ‘Default’ in a call to ivp_stiff_bdf.

petzldbool

Specifies whether the Petzold local error test is to be used. If is set to on entry, the Petzold local error test is used, otherwise a conventional test is used. The Petzold test results in extra overhead cost but is more stable and reliable for differential/algebraic equations.

confloat, array-like, shape

Values to be used to control step size choice during integration. If any on entry, it is replaced by its default value described below. In most cases this is the recommended setting.

, , and are factors used to bound step size changes.

If the current step size fails, the modulus of the next step size is bounded by .

The default value of is .

Note that the new step size may be used with a method of different order to the failed step.

If the initial step size is , the modulus of the step size on the second step is bounded by .

At any other stage in the integration, if the current step size is , the modulus of the next step size is bounded by .

The default values are for and for .

, and are ‘tuning’ constants used in determining the next order and step size.

They are used to scale the error estimates used in determining whether to keep the same order of the BDF method, decrease the order or increase the order respectively.

The larger the value of , for , the less likely the choice of the corresponding order.

The default values are: , , .

tcritfloat

A point beyond which integration must not be attempted. The use of is described under the argument in the specification for the integrator (e.g., see ivp_stiff_exp_fulljac()). A value, say, must be specified even if subsequently specifies that will not be used.

hminfloat

The minimum absolute step size to be allowed. Set if this option is not required.

hmaxfloat

The maximum absolute step size to be allowed. Set if this option is not required.

h0float

The step size to be attempted on the first step. Set if the initial step size is calculated internally.

maxstpint

The maximum number of steps to be attempted during one call to the integrator after which it will return with = 2. Set if no limit is to be imposed.

mxhnilint

The maximum number of warnings printed (if ) per problem when on a step ( current step size). If , a default value of is assumed.

normstr, length 1

Indicates the type of norm to be used.

Maximum norm.

Averaged L2 norm.

Is the same as .

If denotes the norm of the vector of length , for the averaged L2 norm

while for the maximum norm

If you wish to weight the maximum norm or the L2 norm, and should be scaled appropriately on input to the integrator (see under in the specification of the integrator for the formulation of the weight vector from and , e.g., see ivp_stiff_exp_fulljac()).

Only the first character to the actual argument is passed to ivp_stiff_bdf; hence it is permissible for the actual argument to be more descriptive e.g., ‘Maximum’, ‘Average L2’ or ‘Default’ in a call to ivp_stiff_bdf.

Returns
confloat, ndarray, shape

The values actually used by ivp_stiff_bdf.

commdict, communication object

Communication structure.

Raises
NagValueError
(errno )

On entry, and .

Constraint: .

(errno )

On entry, and .

Constraint: .

(errno )

On entry, was less than .

(errno )

On entry, was less than .

(errno )

On entry, and .

Constraint: , the maximum allowed order for the method define by .

(errno )

On entry, .

Constraint: .

(errno )

On entry, and .

Constraint: .

(errno )

On entry, .

Constraint: , or .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: , or .

Notes

No equivalent traditional C interface for this routine exists in the NAG Library.

An integrator setup function must be called before the call to any linear algebra setup function or integrator from the SPRINT suite of functions in this sub-module. This setup function, ivp_stiff_bdf, makes the choice of the BDF integrator and permits you to define options appropriate to this choice. Alternative choices of integrator from this suite are the BLEND method and the DASSL implementation of the BDF method which can be chosen by initial calls to ivp_stiff_blend() or ivp_stiff_dassl() respectively.