Liking cljdoc? Tell your friends :D

physics.integrators

Deterministic numerical integrators for state propagation.

Deterministic numerical integrators for state propagation.
raw docstring

rk4clj

(rk4 {:keys [derivative initial-state t0 dt steps events store?]
      :or {t0 0.0 store? false}})

Classical Runge-Kutta (order 4) for fixed step problems.

Options map: :derivative function (t state) -> state derivative vector :initial-state vector of initial state values :t0 initial time :dt step size (seconds) :steps number of steps to integrate :events optional map of {id event-fn} where event-fn(t, state) -> double :store? if true, retains history for inspection

Returns {:state final-state :time final-time :history [...] :event {:id .. :time .. :state ..}}

Classical Runge-Kutta (order 4) for fixed step problems.

Options map:
  :derivative   function (t state) -> state derivative vector
  :initial-state vector of initial state values
  :t0          initial time
  :dt          step size (seconds)
  :steps       number of steps to integrate
  :events      optional map of {id event-fn} where event-fn(t, state) -> double
  :store?      if true, retains history for inspection

Returns {:state final-state :time final-time :history [...] :event {:id .. :time .. :state ..}}
sourceraw docstring

rkf45clj

(rkf45 {:keys [derivative initial-state t-span rtol atol h-init events store?]
        :or {rtol 1.0E-6 atol 1.0E-9 store? false}})

Adaptive fifth-order Runge-Kutta-Fehlberg integrator.

Options map: :derivative (t state) -> derivative vector :initial-state vector :t-span [t0 tf] :rtol relative tolerance :atol absolute tolerance :h-init optional initial step size

Returns {:state final-state :time tf :steps history :event {:id .. :time .. :state ..}}.

Adaptive fifth-order Runge-Kutta-Fehlberg integrator.

Options map:
  :derivative (t state) -> derivative vector
  :initial-state vector
  :t-span [t0 tf]
  :rtol relative tolerance
  :atol absolute tolerance
  :h-init optional initial step size

Returns {:state final-state :time tf :steps history :event {:id .. :time .. :state ..}}.
sourceraw docstring

rkf45-coefficientsclj

source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close