Class RungeKutta

  • All Implemented Interfaces:
    ODESolver
    Direct Known Subclasses:
    EulerMethod

    public class RungeKutta
    extends Object
    implements ODESolver
    The Runge-Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. These techniques were developed around 1900 by the German mathematicians C. Runge and M.W. Kutta.
    See Also:
    • D. Greenspan, Numerical Solution of Ordinary Differential Equations: for Classical, Relativistic and Nano Systems, 1st ed, Wiley-VCH, 2006.
    • Wikipedia: Runge-Kutta methods
    • Constructor Detail

      • RungeKutta

        public RungeKutta​(RungeKuttaStepper stepper,
                          double h)
        Constructs a Runge-Kutta algorithm with the given integrator and the constant step size.
        Parameters:
        stepper - the integrator algorithm
        h - constant step size
      • RungeKutta

        public RungeKutta​(RungeKuttaStepper stepper,
                          int N)
        Constructs a Runge-Kutta algorithm with the given integrator and the constant number of steps.
        Parameters:
        stepper - the integrator algorithm
        N - constant number of steps
    • Method Detail

      • solve

        public ODESolution solve​(ODE1stOrder ode)
        Solves a first order ODE.
        Specified by:
        solve in interface ODESolver
        Parameters:
        ode - the ODE problem
        Returns:
        the solution