# naginterfaces.library.ode.ivp_​stiff_​blend¶

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

ivp_stiff_blend is a setup function which must be called prior to linear algebra setup functions and integrators from the SPRINT suite of functions, if the BLEND formulae are to be used.

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

https://www.nag.com/numeric/nl/nagdoc_28.6/flhtml/d02/d02nwf.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 (e.g., see ivp_stiff_exp_fulljac()).

maxordint

The maximum order to be used for the BLEND method.

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 BLEND 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 , e.g., see ivp_stiff_exp_fulljac()) per problem when on a step (). 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 ‘A’.

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., ivp_stiff_exp_fulljac()).

Only the first character of the actual argument is passed to ivp_stiff_blend; 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_blend.

Returns
confloat, ndarray, shape

The values actually used by ivp_stiff_blend.

commdict, communication object

Communication structure.

Raises
NagValueError
(errno )

On entry, and .

Constraint: .

(errno )

On entry, and .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, and .

Constraint: .

(errno )

On entry, was less than .

(errno )

On entry, was less than .

(errno )

On entry, .

Constraint: , or .

(errno )

On entry, .

Constraint: .

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_blend, makes the choice of the BLEND integrator and permits you to define options appropriate to this choice. Alternative choices of integrator from this suite are the BDF method and the DASSL implementation of the BDF method which can be chosen by initial calls to ivp_stiff_bdf() or ivp_stiff_dassl() respectively.