Interface ODESolver

All Known Subinterfaces:
ODEAdaptiveSolver, ODEEventSolver, ODEInterpolationSolver
All Known Implementing Classes:
AbstractODESolver, Adams4, Adams5, Adams6, Butcher5, CashKarp45, DormandPrince45, Euler, EulerRichardson, Fehlberg8, Heun3, LeapFrog, ODEBisectionEventSolver, ODEMultistepSolver, Ralston2, RK4, RK45, RK45MultiStep, Verlet

public interface ODESolver
ODE defines a minimal differential equation solver.
Author:
Wolfgang Christian
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Gets the step size.
    void
    initialize(double stepSize)
    Initializes the ODE solver.
    void
    setStepSize(double stepSize)
    Sets the initial step size.
    double
    Steps (advances) the differential equations by the stepSize.
  • Method Details

    • initialize

      void initialize(double stepSize)
      Initializes the ODE solver. ODE solvers use this method to allocate temporary arrays that may be required to carry out the solution. The number of differential equations is determined by invoking getState().length on the ODE.
      Parameters:
      stepSize -
    • step

      double step()
      Steps (advances) the differential equations by the stepSize. The ODESolver invokes the ODE's getRate method to obtain the initial state of the system. The ODESolver then advances the solution and copies the new state into the state array at the end of the solution step.
      Returns:
      the step size
    • setStepSize

      void setStepSize(double stepSize)
      Sets the initial step size. The step size may change if the ODE solver implements an adaptive step size algorithm such as RK4/5.
      Parameters:
      stepSize -
    • getStepSize

      double getStepSize()
      Gets the step size.
      Returns:
      the step size