View Source Integrator.RungeKutta behaviour (Integrator v0.1.2)

A behaviour that Runge-Kutta algorithms must implement. Currently, Integrator.DormandPrince45 and Integrator.BogackiShampine23 implement this behaviour.

See the list of Runge-Kutta methods

Summary

Callbacks

Integrates an ODE function

Interpolates using the method that is suitable for this particular Runge-Kutta method

The order of this Runge-Kutta method

Types

@type interpolate_fn_t() :: (Nx.t(), Nx.t(), Nx.t(), Nx.t() -> Nx.t())
@type ode_fn_t() :: (Nx.t(), Nx.t() -> Nx.t())
@type stepper_fn_t() ::
  ((Nx.t(), Nx.t() -> Nx.t()), Nx.t(), Nx.t(), Nx.t(), Nx.t(), Nx.t() ->
     {Nx.t(), Nx.t(), Nx.t(), Nx.t()})

Callbacks

Link to this callback

integrate(ode_fn, t, x, dt, k_vals, t_next)

View Source
@callback integrate(
  ode_fn :: ode_fn_t(),
  t :: Nx.t(),
  x :: Nx.t(),
  dt :: Nx.t(),
  k_vals :: Nx.t(),
  t_next :: Nx.t()
) :: {x_next :: Nx.t(), x_est :: Nx.t(), k_new :: Nx.t()}

Integrates an ODE function

Link to this callback

interpolate(t, x, der, t_out)

View Source
@callback interpolate(t :: Nx.t(), x :: Nx.t(), der :: Nx.t(), t_out :: Nx.t()) ::
  x_out :: Nx.t()

Interpolates using the method that is suitable for this particular Runge-Kutta method

@callback order() :: integer()

The order of this Runge-Kutta method