d02mzf interpolates components of the solution of a system of first-order differential equations from information provided by those integrators in Sub-chapter D02M–N using methods set up by
calls to d02mvf,d02nvford02nwf.
The routine may be called by the names d02mzf or nagf_ode_ivp_stiff_interp.
d02mzf evaluates the first m components of the solution of a system of ordinary differential equations at any point using natural polynomial interpolation based on information generated by the integrator. This information must be passed unchanged to d02mzf. d02mzf should not normally be used to extrapolate outside the range of values obtained from the above routine.
On entry: the point at which the first m components of the solution are to be evaluated. tsol should not normally be an extrapolation point. Extrapolation is permitted but not recommended.
2: – Real (Kind=nag_wp) arrayOutput
On exit: the calculated value of the solution at tsol.
3: – IntegerInput
On entry: the number of components of the solution whose values are required.
4: – IntegerInput
On entry: the value used for the argument ldysav when calling the integrator.
5: – IntegerInput
On entry: the value used for the argument neq when calling the integrator.
6: – Real (Kind=nag_wp) arrayCommunication Array
On entry: the values provided in the array ysav on return from the integrator.
7: – IntegerInput
On entry: the value used for the argument sdysav when calling the integrator.
8: – Real (Kind=nag_wp) arrayCommunication Array
On entry: the values provided in the array rwork on return from the integrator.
9: – IntegerInput/Output
On entry: ifail must be set to , or to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of means that an error message is printed while a value of means that it is not.
If halting is not appropriate, the value or is recommended. If message printing is undesirable, then the value is recommended. Otherwise, the value is recommended. When the value or is used it is essential to test the value of ifail on exit.
On exit: unless the routine detects an error or a warning has been flagged (see Section 6).
6Error Indicators and Warnings
If on entry or , explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
On entry, .
On entry, .
On entry, and .
On entry, .
On entry, and .
Either the integrator function has not been called prior to the first call of this function or the array has become corrupted.
On entry, d02mzf has been called for extrapolation. Before returning with this error exit, the value of the solution at tsol is calculated and placed in sol.
An unexpected error has been triggered by this routine. Please
See Section 7 in the Introduction to the NAG Library FL 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 FL Interface for further information.
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.
The solution values returned will be of a similar accuracy to those computed by the integrator.
8Parallelism and Performance
Background information to multithreading can be found in the Multithreading documentation.
d02mzf is not thread safe and should not be called from a multithreaded user program. Please see Section 1 in FL Interface Multithreading for more information on thread safety.
d02mzf is not threaded in any implementation.
This example solves the well-known stiff Robertson problem written in implicit form
with initial conditions and over the range with vector error control (), the BDF method (setup routine d02nvf) and functional iteration. The Jacobian is calculated numerically if the functional iteration encounters difficulty and the integration is in one-step mode (), with natural interpolation to calculate the solution at intervals of using d02mzf externally. d02nby is used for monitr.