#lang scheme/base
(require (lib "contract.ss"))
(require (lib "include.ss"))
(require "ode-initval/system.ss"
"ode-initval/step.ss"
"ode-initval/control.ss"
"ode-initval/standard-control.ss"
"ode-initval/evolve.ss")
(provide
(rename-out (ode-system-function-eval unchecked-ode-system-function-eval)
(ode-system-jacobian-eval unchecked-ode-system-jacobian-eval)
(ode-step-apply unchecked-ode-step-apply)
(ode-step-reset unchecked-ode-step-reset)
(ode-evolve-apply unchecked-ode-evolve-apply)
(ode-evolve-reset unchecked-ode-evolve-reset)))
(provide/contract
(ode-system?
(-> any/c boolean?))
(make-ode-system
(-> procedure? (or/c procedure? false/c) natural-number/c list? ode-system?))
(ode-system-function
(-> ode-system? procedure?))
(ode-system-jacobian
(-> ode-system? (or/c procedure? false/c)))
(ode-system-dimension
(-> ode-system? natural-number/c))
(ode-system-params
(-> ode-system? list?))
(ode-system-function-eval
(-> ode-system? real? (vectorof real?) (vectorof real?) void?))
(ode-system-jacobian-eval
(-> ode-system? real? (vectorof real?) (vectorof real?) (vectorof real?) void?))
(ode-step-type?
(-> any/c boolean?))
(make-ode-step-type
(-> string? boolean? boolean? procedure? procedure? procedure? procedure? ode-step-type?))
(ode-step-type-name
(-> ode-step-type? string?))
(ode-step-type-can-use-dydt-in?
(-> ode-step-type? boolean?))
(ode-step-type-gives-exact-dydt-out?
(-> ode-step-type? boolean?))
(ode-step-type-make
(-> ode-step-type? procedure?))
(ode-step-type-apply
(-> ode-step-type? procedure?))
(ode-step-type-reset
(-> ode-step-type? procedure?))
(ode-step-type-order
(-> ode-step-type? procedure?))
(ode-step?
(-> any/c boolean?))
(make-ode-step
(-> ode-step-type? natural-number/c ode-step?))
(ode-step-step-type
(-> ode-step? ode-step-type?))
(ode-step-dimension
(-> ode-step? natural-number/c))
(ode-step-state
(-> ode-step? any))
(ode-step-name
(-> ode-step? string?))
(ode-step-order
(-> ode-step? natural-number/c))
(ode-step-apply
(-> ode-step? real? real? (vectorof real?) (vectorof real?)
(vectorof real?) (vectorof real?) ode-system? any))
(ode-step-reset
(-> ode-step? void))
(standard-control-state?
(-> any/c boolean?))
(make-standard-control-state
(-> standard-control-state?))
(standard-control-state-eps-abs
(-> standard-control-state? real?))
(standard-control-state-eps-rel
(-> standard-control-state? real?))
(standard-control-state-a_y
(-> standard-control-state? real?))
(standard-control-state-a_dydt
(-> standard-control-state? real?))
)
(provide
make-ode-control
make-ode-evolve
ode-evolve-count
ode-evolve-failed-steps
standard-control-new
control-y-new
control-yp-new
ode-evolve-reset
ode-evolve-apply
)
(include "ode-initval/rk2.ss")
(include "ode-initval/rk4.ss")
(include "ode-initval/rkf45.ss")
(provide
rk2-ode-type
rk4-ode-type
rkf45-ode-type)