math.numerics
Interface ODESolver

All Known Subinterfaces:
ODEAdaptiveSolver, ODEEventSolver
All Known Implementing Classes:
Euler, EulerRichardson, ODEBisectionEventSolver, ODEMultistepSolver, RK4, RK45, RK45MultiStep, VelocityVerlet, Verlet

public interface ODESolver

ODE defines a minimal differential equation solver.

Author:
Wolfgang Christian

Method Summary
 double getStepSize()
          Gets the step size.
 void initialize(double stepSize)
          Initializes the ODE solver.
 void setStepSize(double stepSize)
          Sets the initial step size.
 double step()
          Steps (advances) the differential equations by the stepSize.
 

Method Detail

initialize

void initialize(double stepSize)
Initializes the ODE solver. ODE solvers use this method to allocate temporary arrays that may be required to carry out the solution. The number of differential equations is determined by invoking getState2().length on the ODE.

Parameters:
stepSize -

step

double step()
Steps (advances) the differential equations by the stepSize. The ODESolver invokes the ODE's getRate method to obtain the initial state of the system. The ODESolver then advances the solution and copies the new state into the state array affineTransform the end of the solution step.

Returns:
the step size

setStepSize

void setStepSize(double stepSize)
Sets the initial step size. The step size may change if the ODE solver implements an adaptive step size algorithm such as RK4/5.

Parameters:
stepSize -

getStepSize

double getStepSize()
Gets the step size.

Returns:
the step size