Section: Software


Participants : Timothy Bourke, Marc Pouzet [contact] .

ML-Sundials library provides an Ocaml interface to the Sundials numerical suite  (https://computation.llnl.gov/casc/sundials/main.html ) (version 2.4.0). This library is used for solving and initial value problem and includes a zero-crossing detection mechanism. Only the CVODE solver with serial nvectors is currently supported. The structure and naming conventions largely follow the original libraries, both for ease of reading the existing documentation and for converting existing source code, but several changes have been made for programming convenience, namely:

  • solver sessions are configured through algebraic data types rather than through multiple function calls,

  • error conditions are signalled by exceptions rather than return codes (including in user-supplied callback routines),

  • closures (partial applications of higher-order functions) are used to share user data between callback routines, and,

  • explicit free commands are not necessary nor provided since Ocaml is a garbage-collected language.

The library is in use in a new synchronous hybrid language we are currently developping.