Package org.opensourcephysics.numerics
Interface ODE
- All Known Implementing Classes:
DynamicParticle
,DynamicParticlePolar
,DynamicSystem
,ODEMultistepSolver.InternalODE
public interface ODE
ODE defines a system of differential equations by providing access to the rate equations.
- Author:
- Wolfgang Christian
-
Method Summary
-
Method Details
-
getState
double[] getState()Gets the state variables. The getState method is invoked by an ODESolver to obtain the initial state of the system. The ODE solver advances the solution and then copies new values into the state array at the end of the solution step.- Returns:
- state the state
-
getRate
void getRate(double[] state, double[] rate) Gets the rate of change using the argument's state variables. This method may be invoked many times with different intermediate states as an ODESolver is carrying out the solution.- Parameters:
state
- the state arrayrate
- the rate array
-