Module Sundials

module Sundials: sig .. end
Generic definitions, arrays, and utility functions.
Author(s): Timothy Bourke (Inria/ENS), Jun Inoue (Inria/ENS), Marc Pouzet (UPMC/ENS/Inria)
Version: 2.7.0


Constants


val version : int * int * int * int
The major, minor, patch, and binding version numbers of Sundials/ML. The first three elements correspond to the maximum supported version of the underlying Sundials/C library. The binding number distinguishes updates to the binding (restarting from 0 for each increment of the other elements).
val sundials_version : int * int * int
The major, minor, and patch version numbers of the underlying Sundials/C library. The OCaml interface may have been built against an older version of Sundials.
val lapack_enabled : bool
Indicates whether the interface was compiled with BLAS/LAPACK support.
val mpi_enabled : bool
Indicates whether the parallel nvectors and linear solvers are available.
val klu_enabled : bool
Indicates whether the KLU sparse linear solver is available.
val superlumt_enabled : bool
Indicates whether the SuperLU_MT sparse linear solver is available.
val nvecpthreads_enabled : bool
Indicates whether pthreads-based nvectors are available.
val nvecopenmp_enabled : bool
Indicates whether openmp-based nvectors are available.
val big_real : float
The largest value representable as a real.
See sundials: Data Types
val small_real : float
The smallest value representable as a real.
See sundials: Data Types
val unit_roundoff : float
The difference bewteen 1.0 and the minimum real greater than 1.0.
See sundials: Data Types

Exceptions


exception RecoverableFailure
Indicates a recoverable failure within a callback function. Any other exception normally indicates an unrecoverable failure.
exception NonPositiveEwt
Raised by error-weight functions on non-positive error weights. See Cvode.WFtolerances or Ida.WFtolerances.
exception InvalidLinearSolver
Raised on invalid use of linear solver functions. For instance, initializing a session with Cvode.Diag and then calling Cvode.Spils.get_num_lin_iters, which rather requires a linear solver from Cvode.Spils.
exception NotImplementedBySundialsVersion
Raised for features that are not available in the installed version of the underlying sundials library. See Sundials.sundials_version.

Arrays


module RealArray: sig .. end
Vectors of floats (one-dimensional bigarrays).
module RealArray2: sig .. end
Matrices of floats (wrappers around two-dimensional bigarrays).
module LintArray: sig .. end
Vectors of integers (one-dimensional bigarrays).

Arrays of roots (zero-crossings)


module Roots: sig .. end
Vectors of root (zero-crossing) statuses.
module RootDirs: sig .. end
Vectors of root (zero-crossing) directions.

Constraints


module Constraint: sig .. end
Symbolic names for variable constraints.

Solver results and error reporting


module Logfile: sig .. end
Files for error and diagnostic information.
type error_details = {
   error_code : int;
   module_name : string; (*
IDA, CVODE, CVSPGMR, etc.
*)
   function_name : string;
   error_message : string;
}
Information passed to registered error handler functions. See Cvode.set_err_handler_fn, Ida.set_err_handler_fn, and Kinsol.set_err_handler_fn.
See sundials: CVodeErrHandlerFn
See sundials: IDAErrHandlerFn
See sundials: KINErrHandlerFn

Miscellaneous utility functions


val format_float : string -> float -> string
format_float fmt f formats f according to the format string fmt. It uses the low-level caml_format_float function.
val floata : float -> string
Returns the bit-level representation of a float in hexadecimal as a string. Equivalent to format_float "%a".