C# Class Nexus.NumericalAnalysis.OdeSolver

This class implements functions that solve first-order ordinary differential equations (ODEs).
ファイルを表示 Open project: tgjones/nexus

Public Methods

Method Description
Solve ( float initial, float x, float h ) : float[]

This method solves first-order ODEs. It is passed an array of dependent variables in "array" at x, and returns an array of new values at x + h.

Protected Methods

Method Description
DoEulerStep ( float initial, float derivs, float h ) : float[]

Processes a simple Euler step

OdeSolver ( int dimensions, CalculateDerivatives callback )

Method Details

DoEulerStep() protected static method

Processes a simple Euler step
protected static DoEulerStep ( float initial, float derivs, float h ) : float[]
initial float
derivs float
h float
return float[]

OdeSolver() protected method

protected OdeSolver ( int dimensions, CalculateDerivatives callback )
dimensions int
callback CalculateDerivatives

Solve() public abstract method

This method solves first-order ODEs. It is passed an array of dependent variables in "array" at x, and returns an array of new values at x + h.
public abstract Solve ( float initial, float x, float h ) : float[]
initial float Array of initial values
x float Initial value of x (usually time)
h float Increment value for x (usually delta time)
return float[]