The function may be called by the names: d02mwc, nag_ode_dae_dassl_setup or nag_dae_ivp_dassl_setup.
This integrator setup function must be called before the first call to the integrator d02nec. d02mwc permits you to define options for the DASSL integrator, such as: whether the Jacobian is to be provided or is to be approximated numerically by the integrator; the initial and maximum step-sizes for the integration; whether relative and absolute tolerances are system wide or per system equation; and the maximum order of BDF method permitted.
1: – IntegerInput
On entry: the number of differential-algebraic equations to be solved.
2: – IntegerInput
On entry: the maximum order to be used for the BDF method. Orders up to 5th order are available; setting means that the maximum order used will be .
3: – Nag_EvaluateJacobianInput
On entry: specifies the technique to be used to compute the Jacobian.
The Jacobian is to be evaluated numerically by the integrator.
You must supply a function to evaluate the Jacobian on a call to the integrator.
4: – doubleInput
On entry: the maximum absolute step size to be allowed. Set if this option is not required.
5: – doubleInput
On entry: the step size to be attempted on the first step. Set if the initial step size is calculated internally.
6: – Nag_BooleanInput
On entry: a value to indicate the form of the local error test.
On exit: used to communicate problem parameters to the integration function d02nec. This must be the same communication array as the array com supplied to d02nec. In particular, the values of hmax and h0 are contained in com.
the array com must be large enough for the requirements of d02nec. That is:
if the system Jacobian is dense, ;
if the system Jacobian is banded, .
Here ml and mu are the lower and upper bandwidths respectively that are to be specified in a subsequent call to d02npc.
11: – NagError *Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).
6Error Indicators and Warnings
Dynamic memory allocation failed.
See Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
On entry, argument had an illegal value.
On entry, and .
On entry, .
On entry, .
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 7.5 in the Introduction to the NAG Library CL Interface for further information.
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library CL Interface for further information.
On entry, .
8Parallelism and Performance
Background information to multithreading can be found in the Multithreading documentation.
d02mwc is not threaded in any implementation.
This example solves the plane pendulum problem, defined by the following equations:
Differentiating the algebraic constraint once, a new algebraic constraint is obtained
Differentiating the algebraic constraint one more time, substituting for , , , and using , the corresponding DAE system includes the differential equations and the algebraic equation in :
We solve the reformulated DAE system
For our experiments, we take consistent initial values