Class RungeKuttaNs

java.lang.Object
gaiasky.util.gaia.utils.RungeKuttaNs

public class RungeKuttaNs extends Object
  • Constructor Details

    • RungeKuttaNs

      public RungeKuttaNs()
  • Method Details

    • 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 Equations
      tOld - the initial value for t
      y0 - the initial value for y
      tNew - the value of t where we want to know y
      tStepMax - the initial step size
      tUnit - the time unit used for the derivatives
      Returns:
      the value of y at xn