<<<<<<<<<<<<<<<<<

rkqc_solver(numer) Numerical Analysis rkqc_solver(numer)

NAME

rkqc_solver - Object that solves the system of ordinary differential equations.

DESCRIPTION

Fifth order Runge_Kutta solver with monitoring of local truncation error to ensure accuracy and adjust stepsize. Input are function that computes the right side of the system of ordinary differential equations (derivatives) and the starting (start) and the ending (end) values of independent variable. Also input is the min_step, the minimum step size to be attempted at every step performed by the rkqc_stepper. See Numerical Recipes in C, by W.H.Press, et all, Cambridge University Press, 1988, p. 577.

SUPERCLASS

rk4_stepper

INSTANCE VARIABLES

start is the initial value of independent variable.

end is the final value of independent variable.

min_step is the minimum value of the step made by quality controlled Runge_Kutta rk4_stepper.

good_steps is the number of successful steps in Runge_Kutta method.

bad_steps is the number of unsuccessful steps in Runge_Kutta method. Each time unsuccessful step is made a new attempts is made with the smaller step size.

data is the pointer to the data object. It is a private variable.

data_capacity is the dimension of array for temporary storage of found solution.

data_min_step is the value of minimum increment of independent variable in data object where solution is stored for retrieval.

speed_guard is the value of dx/dt for which the solution process should terminate. Really it should be in a subclass since it is specific to Golf application.

MESSAGES

bad_steps? returns the value of bad_steps.

data:argument saves the solution of the system in the data object named argument.

data_capacity=argument sets the value of the data_capacity instance variable.

data_capacity? returns the value of the data_capacity instance variable.

data_min_step=argument sets the value of the instance variable data_min_step.

data_min_step? returns the value of the instance variable data_min_step.

end=argument sets the value of the instance variable end.

end? returns the value of the instance variable end.

good_steps? returns the values of the instance variable good_steps.

min_step=argument sets the value of the instance variable min_step.

min_step? returns the value of the instance variable min_step.

solve! solves the system of differential equations specified by the function instance variable for the independent variable in the interval (start, end).

speed_guard=argument sets the value of the instance variable speed_guard.

speed_guard? returns the value of the instance variable speed_guard.

start=argument sets the value of the instance variable start.

start? returns the value of the instance variable start.

EXAMPLES

/* This code contains undefined object called system_function, therefore it cannot be executed directly; you should use your function instead that is defined object and responds to the messages state= and state? */

system_function new: my_function;

rkqc_solver new: asolver function= my_function start= 0 end= 5 min_step = .1 eps = 0.001 data_capacity= 300 speed_guard= .2 ;

asolver solve! data: adata;

SEE ALSO

lu_solver, rk4_stepper, rk_shooter, rk4_solver, rkqc_stepper.


Please send comments and suggestions to
consult@rpi.edu