View Source Integrator.MultiIntegrator (Integrator v0.1.3)

Integrates multiple simulations that are tied together somehow, such as a bouncing ball in the ballode.m example.

Summary

Functions

Collates the simulation output from all of the integrations

Integrates multiple times, with a transition function handling the junction between integrations

Types

@type integration_status() :: :halt | :continue | :completed
@type t() :: %Integrator.MultiIntegrator{
  event_t: [Nx.t()],
  event_x: [Nx.t()],
  integration_status: integration_status(),
  integrations: [Integrator.AdaptiveStepsize.t()],
  t_end: Nx.t(),
  t_start: Nx.t(),
  transition_x: [Nx.t()]
}
@type transition_fn_t() ::
  (Nx.t(), Nx.t(), t(), Keyword.t() ->
     {integration_status(), Nx.t(), Nx.t(), Keyword.t()})

Functions

Link to this function

all_output_data(multi, t_or_x)

View Source
@spec all_output_data(t(), atom()) :: [Nx.t()]

Collates the simulation output from all of the integrations

Link to this function

integrate(ode_fn, event_fn, transition_fn, t_start, t_end, x0, opts)

View Source
@spec integrate(
  ode_fn :: Integrator.RungeKutta.ode_fn_t(),
  event_fn :: Integrator.AdaptiveStepsize.event_fn_t(),
  transition_fn :: transition_fn_t(),
  t_start :: Nx.t(),
  t_end :: Nx.t(),
  x0 :: Nx.t(),
  opts :: Keyword.t()
) :: t()

Integrates multiple times, with a transition function handling the junction between integrations

Options

See the options for these functions which are passed through: