fluxion v0.2.0 Fluxion.ODE behaviour View Source
An Ordinary Differential Equation which can be used to solve initial value problems.
@y’(t) = f(t, y(t)), t \ge 0@
Examples
Define an ODE module for the equation @y’(t) = te^t@.
iex> defmodule Exp do
...> @behaviour Fluxion.ODE
...> @impl true
...> def f(t, y_t), do: t * :math.exp(t)
...> end
iex> IO.puts(Exp.f(1, 2))
:ok
Link to this section Summary
Functions
Evaluate an ODE module with the provided time and value
Link to this section Types
Link to this section Functions
Evaluate an ODE module with the provided time and value.
Examples
iex> defmodule Const do
...> @behaviour Fluxion.ODE
...> @impl true
...> def f(t, y_t), do: 2.0
...> end
iex> Fluxion.ODE.f!(Const, 10.0, -87.0)
2.0
Link to this section Callbacks
Compute the derivative at a given point in time. e.g. compute @f(t, y_t)@ for a given value of @t@.