cnuphys.integrator
Interface IDerivative


public interface IDerivative

This interface is where the specificity of the problem enters. Any integrator such as RungeKutta4 will solve 1st order ODEs of the form dy/dt = f(t). The vector y is often a six-D vector [x, y, z, vx, vy, vx]. The specificity of the problem is implemented by filling the dydt vector.

Author:
heddle

Method Summary
 void derivative(double t, double[] y, double[] dydt)
          Compute the derivatives given the value of the independent variable and the values of the function.
 

Method Detail

derivative

void derivative(double t,
                double[] y,
                double[] dydt)
Compute the derivatives given the value of the independent variable and the values of the function. Think of the Differential Equation as being dydt = f[y,t].

Parameters:
t - the value of the independent variable (usually t) (input).
y - the values of the state vector (usually [x,y,z,vx,vy,vz]) at t (input).
dydt - will be filled with the values of the derivatives at t (output).