Package gaiasky.util.gaia.utils
Class RungeKuttaNs
- java.lang.Object
-
- gaiasky.util.gaia.utils.RungeKuttaNs
-
public class RungeKuttaNs extends java.lang.Object
Provides an implementation of the Runge-Kutta method for solving single or sets of ordinary differential equations (ODEs).A set of ODEs are supplied by means of the interface DiffnFunction.
This class is taken from the Java library developed by Michael Thomas Flanagan available at http://www.ee.ucl.ac.uk/~mflanaga/java/RungeKutta.html
NOTE: This is for RSLS use only - do not use in any other software
-
-
Constructor Summary
Constructors Constructor Description RungeKuttaNs()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static double[]
fourthOrder(DiffnFunctionNs g, long tOld, double[] y0, long tNew, long tStepMax, long tUnit)
Returns the value of y at a given value of x (xn) for a set of ordinary differential equation (ODEs)
See http://www.ee.ucl.ac.uk/~mflanaga/java/RungeKutta.html#four
-
-
-
Method Detail
-
fourthOrder
public static double[] fourthOrder(DiffnFunctionNs g, long tOld, double[] y0, long tNew, long tStepMax, long tUnit)
Returns the value of y at a given value of x (xn) for a set of ordinary differential equation (ODEs)
See http://www.ee.ucl.ac.uk/~mflanaga/java/RungeKutta.html#four- Parameters:
g
- an implementation of DiffnFunction describing a set of Ordinary Differential EquationstOld
- the initial value for ty0
- the initial value for ytNew
- the value of t where we want to know ytStepMax
- the initial step sizetUnit
- the time unit used for the derivatives- Returns:
- the value of y at xn
-
-