package cviode

  1. Overview
  2. Docs

Parameters

module A : sig ... end

Signature

type s = mat * mat

s is the type of the state (and thus also of the initial condition) provided to Owl_ode.Ode.odeint. For example Owl.Mat.mat.

type t = mat

t is type of the output of the evolution function f: s-> float ->t. For example, in the case of sympletic solvers, type s = Owl.Mat.(mat*mat) and type t = Owl.Mat.mat.

type output = mat * mat * mat

output defines the type of the output of Owl_ode.Ode.odeint. For example, in the case of sympletc solvers, type output = Owl.Mat.(mat * mat * mat), corresponds to matrices that contain respectively the time, position, and momentum coordinates of the integrated solution

val solve : (s -> float -> t) -> s -> Owl_ode.Types.tspec_t -> unit -> output

solve f y0 tspec () solves the initial value problem

∂ₜ y = f(y, t) y(t₀) = y₀

with the given evolution function f, initial condition y0, and temporal specification tspec, and returns the desired outputs of type output. Several such functions have already been implemented in this library and can be used as reference.

OCaml

Innovation. Community. Security.