|
|
◆ ylaga()
| void ylaga |
( |
int |
i, |
|
|
int |
n, |
|
|
double |
t, |
|
|
double |
y[], |
|
|
void(*)(int, int, double, double *, int *) |
phi, |
|
|
double |
work[], |
|
|
int |
iwork[], |
|
|
int * |
info |
|
) |
| |
Initial value problem of delay differential equations (5(4)-th order Dorman-Prince method) (Computation of back-values of solution)
- Purpose
- This program is the support program which computes the back-values of the solution by interpolation for solving an initial value problem of the delay differential equations by Retard.
A system of first order delay ordinary differential equations of the form dy/dt = f(t, y(t), y(t - τ), y(t - τ2), ...), y = y0 at t = t0
where f depends on the values at previous points y(t - τ), y(t - τ2), .... These values can be computed by using this program.
This program is the rewrite of YLAG used for the 5(4)-th order Dormand-Prince code for delay equations, RETARD (Reference (1)).
- Parameters
-
| [in] | i | Element number of y to be interpolated. (1 <= i <= n or i = 0)
1 <= i <= n: Only the i-th element of y is computed.
i = 0: All elements of y (y[0] 〜 y[n - 1]) are computed. |
| [in] | n | Number of differential equations. (n >= 1) |
| [in] | t | Independent variable. To compute back-value y(t - τ), for example, t - τ is given to this argument. |
| [out] | y[] | Array y[ly] (ly >= 1 (1 <= i <= n), ly >= n (i = 0))
The values of dependent variable at t (interpolation of numerical solution).
1 <= i <= n: The computed i-th element of y is returned in y[0].
i = 0: All computed elements are returned in y[0] 〜 y[n - 1]. |
| [in] | phi | The user supplied subroutine, which returns the values of y at t < t0, defined as follows. void phi(int i, int n, double t, double y[], int *info)
{
y[] = values of y at t (where t0 - τ < t < t0);
*info = 0;
}
If i = 0, all elements must be stored in y[0] 〜 y[n - 1]. Otherwise, i-th element must be stored in y[0]. Only the values of i, which are used in ylaga by the user, may be supported. ylaga will terminate if phi returns info != 0. |
| [in] | work[] | Array work[*]
Control information. work[] which is used for retarda or retarda_r must be passed without change. |
| [in] | iwork[] | Array iwork[*]
Integer control information. iwork[] which is used for retarda or retarda_r must be passed without change. |
| [out] | info | Return code.
= 0: Successful exit.
< 0: The (-info)-th argument is invalid.
= 11: (Error) Invalid control information.
= 12: (Error) t is too small. iwork[6] of retarda may be too small.
= 13: (Error) t is too large.
= Others: phi returnd this value (!= 0) as info. |
- Reference
- (1) E. Hairer, S.P. Norsett and G. Wanner, "Solving Ordinary Differential Equations. Nonstiff Problems. 2nd edition", Springer Series in Computational Mathematics, Springer-Verlag (1993)
|