Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
native_d.ml1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64# 1 "src/ode/native/native_d.ml" (* * OWL - OCaml Scientific and Engineering Computing * OWL-ODE - Ordinary Differential Equation Solvers * * Copyright (c) 2019 Ta-Chu Kao <tck29@cam.ac.uk> * Copyright (c) 2019 Marcello Seri <m.seri@rug.nl> *) module Types = Owl_ode_base.Types type mat = Owl_dense_matrix_d.mat include Owl_ode_base.Native_generic.Make (Owl_algodiff_primal_ops.D) module Euler = struct type state = mat type f = mat -> float -> mat type step_output = mat * float type solve_output = mat * mat let step = euler_s let solve = prepare step end module Midpoint = struct type state = mat type f = mat -> float -> mat type step_output = mat * float type solve_output = mat * mat let step = midpoint_s let solve = prepare step end module RK4 = struct type state = mat type f = mat -> float -> mat type step_output = mat * float type solve_output = mat * mat let step = rk4_s let solve = prepare step end module RK23 = struct type state = mat type f = mat -> float -> mat type step_output = mat * float * float * bool type solve_output = mat * mat let step = rk23_s ~tol:1e-7 ~dtmax:1E-4 let solve = adaptive_prepare (rk23_s ~tol:1E-7) end module RK45 = struct type state = mat type f = mat -> float -> mat type step_output = mat * float * float * bool type solve_output = mat * mat let step = rk45_s ~tol:1e-7 ~dtmax:1E-4 let solve = adaptive_prepare (rk45_s ~tol:1E-7) end