XLPack 7.0
XLPack Numerical Library (Excel VBA) Reference Manual
Loading...
Searching...
No Matches

◆ Ylag_r()

Sub Ylag_r ( I As  Long,
T As  Double,
RCont() As  Double,
ICont() As  Long,
YY As  Double,
IRev As  Long 
)

Initial value problem of delay differential equations (5(4)-th order Dorman-Prince method) (Reverse communication version) (Interpolation for back-values of solution)

NOTE - THIS PROGRAM IS DEPRECATED AND WILL BE REMOVED IN THE NEXT VERSION.

Purpose
This routine is the support routine which computes the back-values of the solution by interpolation for solving an initial value problem of the delay differential equations and dense output by Retard_r.
Parameters
[in]IElement number of solution to be interpolated. (0 <= I <= N - 1)
[in]TT at which the interpolated solution is computed.
T must be in the interval of the available back steps. Otherwise. 0 will be returned and Retard_r will be terminated with Info = 14. The number of back steps available through this routine depends on the allocated working memory, and it is determined by the size of RCont() (LRCont) when Retard_r is called.
[in]RCont()Array RCont(LRCont - 1) (LRCont >= Mxst*(5*Nrdens)
Control information for back-values of the solution.
Enter RCont() used for Retard_r without change.
[in]ICont()Array ICont(LICont - 1) (LICont >= Nrdens)
Control information for back-values of the solution.
Enter ICont() used for Retard_r without change.
[in,out]YY[in] IRev = 1: Enter the value of Y(I) at T in YY and call this routine again (note that t0 - τ <= T <= t0). This is same with Phi in the case of Ylag so that the function value at up to τ before t0 must is defined. For the components which do not need retarded argument in the definition of differential equations, IRev = 1 will not be returned.
[out] IRev = 0: Interpolated solution Y(I) at T.
[in,out]IRevControl variable for reverse communication.
[in] Before first call, IRev should be initialized to zero. On succeeding calls, IRev should not be altered.
[out] If IRev is not zero, complete the following tasks and call this routine again without changing IRev.
= 0: Computation finished.
= 1: The value of Y(I) at T must be given in YY.
Reference
E. Hairer, S.P. Norsett and G. Wanner, "Solving Ordinary Differential Equations. Nonstiff Problems. 2nd edition", Springer Series in Computational Mathematics, Springer-Verlag (1993)
Example Program
Compute y(t - τ).
where I is the component number (0 to N - 1) and T is t - τ. RCont() and ICont() must be passed without altering those values. The result is returned in YY when IRev = 0.
If t0 - τ <= T <= t0 (where t0 is the initial value of t), IRev = 1 is returned. Then the value of Y(I) at T must be given in YY.
IRev = 0
Do
Call Ylag_r(I, T, RCont(), ICont(), YY, IRev)
If IRev = 1 Then YY = value of Y(I) at T (where t0 - τ <= T <= t0)
Loop While IRev <> 0
Sub Ylag_r(I As Long, T As Double, RCont() As Double, ICont() As Long, YY As Double, IRev As Long)
Initial value problem of delay differential equations (5(4)-th order Dorman-Prince method) (Reverse c...