{--------------------------------------------------------------}
UNIT RK_Strob;
{
Main part of the Runge-Kutta integration package in Pascal
with stroboscopic tracing.
Authors:
Yuri Sadov <yu@bibigon.msk.ru>,
Sergey Sadov <sadov@math.mun.ca>,
Margo Kondrat'eva <margo@math.mun.ca>
1990-1996
}
INTERFACE
Uses Gennum; {real type and constants (e.g. Pi) are defined}
type
vectortype=array[1..RK_MaxDim] of realtype;
proctype=procedure(t:realtype; var x,f:vectortype);
tracer=procedure(var x:vectortype; var end_mark: word);
{end_mark: if the tracer procedure sets it
to $FFFF than integration terminates.
For example if x[1] is time, then the tracer
can contain the code:
if (x[1]<t_end) then end_mark:=0
else end_mark:=$FFFF;
}
procedure RKF_STROB(N_VAR: integer; var Y:vectortype;
RightHandSide: proctype; StrobHandler: tracer;
Integration_Time: realtype);
{
N_VAR: number of dependent variables;
Y: vector of variables;
RightHandSide: vector-valued function, RHS of the ODE system;
StrobHandler: checks vector Y at each integration step
and performs a prescribed action. For example,
puts a dot onto trajectory projection at specified times.
Integration_Time: limits the duration of integration.
However, StrobHandler can terminate it earlier (see above).
}
{--------------------------------------------------------------}
Details User Manual - plain text
Download full code and examples (18 Kb zipped)