Module Owl_ode.Types

The Types module provides some common types for Owl_ode ODEs integrators.

type tspec =
| T1 of {
t0 : float;
duration : float;
dt : float;
}
(*

The T1 constructor allow to specify the initial and final integration time, in the sense that the solver starts with t=t0 and integrates until it reaches t=t0+duration, and the timestep dt. This last parameter is ignored by the adaptive methods.

*)
| T2 of {
tspan : float * float;
dt : float;
}
(*

The T2 constructor allow to specify a tuple (t0, tf) of the initial and final integration time, in the sense that the solver starts with t=t0 and integrates until it reaches t=tf, and the timestep dt. This last parameter is ignored by the adaptive methods.

*)
| T3 of float array(*

The T3 constructor is currently unsupported and may change or disappear in the future.

*)

Time specification for the ODE solvers.

module type Solver = sig ... end

Any solver compatible with Owl_ode_base.Ode.odeint has to comply with the Solver type. You can use this to define completely new solvers, as done in the owl-ode-sundials, owl-ode-odepack or ocaml-cviode libraries, or to customize pre-existing solvers (see the van_der_pol example for one such cases).