Class RungeKuttaFehlberg

java.lang.Object
nl.tudelft.simulation.jstats.ode.integrators.NumericalIntegrator
nl.tudelft.simulation.jstats.ode.integrators.RungeKuttaFehlberg
All Implemented Interfaces:
Serializable

public class RungeKuttaFehlberg extends NumericalIntegrator
The RungeKuttaFehlberg.java numerical integrator.

Copyright (c) 2002-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://simulation.tudelft.nl. The DSOL project is distributed under a three-clause BSD-style license, which can be found at https://https://simulation.tudelft.nl/dsol/docs/latest/license.html.

Author:
Alexander Verbraeck
See Also:
  • Field Details

    • a

      protected static double[] a
      the parameters for a_i, in f(x_n + a_i h, .).
    • b

      protected static double[][] b
      the parameters for b_ij, in f(., y_n + b_p1 k1 + bp2 k2 + ...).
    • c

      protected static double[] c
      the parameters for c_i, in y_n+1 = y_n + c_1 k_1 + c_2 k_2 + ...
    • c4

      protected static double[] c4
      the parameters for c4_i, in y_n+1 = y_n + c4_1 k_1 + c4_2 k_2 + ...
    • nk

      protected static int nk
      the numer of k-s in the method.
  • Constructor Details

    • RungeKuttaFehlberg

      public RungeKuttaFehlberg(double stepSize, DifferentialEquationInterface equation)
      constructs a new RungeKuttaFehlberg.
      Parameters:
      stepSize - double; the stepSize
      equation - DifferentialEquationInterface; the differentialEquation
  • Method Details

    • next

      public double[] next(double x, double[] y)
      computes the next value.
      Specified by:
      next in class NumericalIntegrator
      Parameters:
      x - double; the x value corresponding to the last y-value computed
      y - double[]; the last y value
      Returns:
      the new value