| Package | org.generalrelativity.foam.dynamics.ode |
| Interface | public interface IODE |
| Implementors | AbstractSolver, Euler, RigidBody, RK4, SimpleParticle |
| Property | Defined by | ||
|---|---|---|---|
| state : Array [read-only]
Gets the state of the differential equation
Consider a particle with position x and velocity v. | IODE | ||
| Method | Defined by | ||
|---|---|---|---|
|
getDerivative(state:Array, derivative:Array):void
Populates the derivative according to the given state.
| IODE | ||
| state | property |
state:Array [read-only]Gets the state of the differential equation
Consider a particle with position x and velocity v. We want to integrate this state with respect to time. The position and velocity are pushed into the particle's state Array and solved by an IODESolver. By abstracting the process this far, we make it easy to swap solvers for different tasks.
Implementation public function get state():Array
See also
| getDerivative | () | method |
public function getDerivative(state:Array, derivative:Array):voidPopulates the derivative according to the given state.
The IODESolver asks the IODE for its derivative- depending on the order and structure of the solver, this could happen numerous times per time step. It is the IODE's job to use that state to determine its derivative.
The derivative's indices map to the state's.
Parametersstate:Array — state with which to evaluate derivative
|
|
derivative:Array — Array to populate given state's derivatives with
|
See also