feat: re-hide inner states, properly reset sundials
This commit is contained in:
parent
80d4aef23f
commit
76dc461d44
14 changed files with 162 additions and 253 deletions
11
exm/vdp.ml
11
exm/vdp.ml
|
|
@ -28,15 +28,14 @@ let zset s _ = s
|
|||
let jump _ = true
|
||||
let horizon _ = max_float
|
||||
|
||||
let van_der_pol ()
|
||||
: (state, _, _, carray, carray, carray, zarray, carray) hnode
|
||||
= let yd = cmake csize in
|
||||
let van_der_pol () : (_, _, carray, carray, carray, zarray, carray) hnode =
|
||||
let yd = cmake csize in
|
||||
let zout = cmake zsize in
|
||||
let fder _ _ y = fder y yd in
|
||||
let fzer _ _ _ = zout in
|
||||
let init _ = { lx=of_array [| x0; y0 |]; i=true } in
|
||||
let reset _ _ = init () in
|
||||
HNode { init; fder; fzer; fout; step; reset; horizon;
|
||||
let state = { lx=of_array [| x0; y0 |]; i=true } in
|
||||
let reset _ _ = state in
|
||||
HNode { state; fder; fzer; fout; step; reset; horizon;
|
||||
jump; cset; cget; zset; csize; zsize }
|
||||
|
||||
let errmsg = "Too many arguments for the model (needed: 0)"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue