Interface ExplicitRungeKuttaIntegrator

All Superinterfaces:
ButcherArrayProvider, ODEIntegrator
All Known Implementing Classes:
ClassicalRungeKuttaIntegrator, DormandPrince54Integrator, DormandPrince853Integrator, EmbeddedRungeKuttaIntegrator, EulerIntegrator, GillIntegrator, HighamHall54Integrator, LutherIntegrator, MidpointIntegrator, RungeKuttaIntegrator, ThreeEighthesIntegrator

public interface ExplicitRungeKuttaIntegrator extends ButcherArrayProvider, ODEIntegrator
This interface implements the part of Runge-Kutta integrators for Ordinary Differential Equations common to fixed- and adaptive steps.

These methods are explicit Runge-Kutta methods, their Butcher arrays are as follows :

    0  |
   c2  | a21
   c3  | a31  a32
   ... |        ...
   cs  | as1  as2  ...  ass-1
       |--------------------------
       |  b1   b2  ...   bs-1  bs
 
Since:
3.1
See Also:
  • Method Details

    • getNumberOfStages

      default int getNumberOfStages()
      Getter for the number of stages corresponding to the Butcher array.
      Returns:
      number of stages
    • singleStep

      default double[] singleStep(OrdinaryDifferentialEquation equations, double t0, double[] y0, double t)
      Fast computation of a single step of ODE integration.

      This method is intended for the limited use case of very fast computation of only one step without using any of the rich features of general integrators that may take some time to set up (i.e. no step handlers, no events handlers, no additional states, no interpolators, no error control, no evaluations count, no sanity checks ...). It handles the strict minimum of computation, so it can be embedded in outer loops.

      This method is not used at all by the ODEIntegrator.integrate(ExpandableODE, ODEState, double) method. It also completely ignores the step set at construction time, and uses only a single step to go from t0 to t.

      As this method does not use any of the state-dependent features of the integrator, it should be reasonably thread-safe if and only if the provided differential equations are themselves thread-safe.

      Parameters:
      equations - differential equations to integrate
      t0 - initial time
      y0 - initial value of the state vector at t0
      t - target time for the integration (can be set to a value smaller than t0 for backward integration)
      Returns:
      state vector at t
    • applyInternalButcherWeights

      static void applyInternalButcherWeights(ExpandableODE equations, double t0, double[] y0, double h, double[][] a, double[] c, double[][] yDotK)
      Apply internal weights of Butcher array, with corresponding times.
      Parameters:
      equations - differential equations to integrate
      t0 - initial time
      y0 - initial value of the state vector at t0
      h - step size
      a - internal weights of Butcher array
      c - times of Butcher array
      yDotK - array where to store result
    • applyExternalButcherWeights

      static double[] applyExternalButcherWeights(double[] y0, double[][] yDotK, double h, double[] b)
      Apply external weights of Butcher array, assuming internal ones have been applied.
      Parameters:
      yDotK - output of stages
      y0 - initial value of the state vector at t0
      h - step size
      b - external weights of Butcher array
      Returns:
      state vector