@@ -32,15 +32,14 @@ You can use `ds.prob.u0 .= newstate` to set a new state to the system.
3232The equations of motion **must be** in the form `eom!(t, u, du)`,
3333which means that they are **in-place** with the mutated argument
3434`du` the last one. Both `u, du` **must be** `Vector`s. You can still use matrices
35- in your equations of motion though! Just change `function eom(t, u, du)` to
35+ in your equations of motion though! Just change `function eom! (t, u, du)` to
3636```julia
37- function eom(t, u, du)
37+ function eom! (t, u, du)
3838 um = reshape(u, a, b); dum = reshape(du, a, b)
3939 # equations of motion with matrix shape of a×b
4040```
41- and you will be able to express the equations with matrix notation.
4241
43- If you have the `eom` function, and optionally a function for the
42+ If you have the `eom! ` function, and optionally a function for the
4443Jacobian, you can use the constructor
4544```julia
4645ContinuousDS(state, eom! [, jacob! [, J]]; tspan = (0.0, 100.0))
@@ -59,7 +58,8 @@ using the module [`ForwardDiff`](http://www.juliadiff.org/ForwardDiff.jl/stable/
5958As mentioned in our [official documentation](https://juliadynamics.github.io/DynamicalSystems.jl/latest/system_definition#example-using-functors),
6059it is preferred to use Functors for both the equations of motion and the Jacobian.
6160
62- To interfece *towards* DifferentialEquations.jl use `ODEIntegrator(ds, stuff...)`.
61+ To interfece *towards* DifferentialEquations.jl use `ODEIntegrator(ds, stuff...)`
62+ and `ODEProblem(ds, stuff...)`.
6363Notice that you can have performance gains for stiff methods by
6464explicitly adding a Jacobian caller for DifferentialEquations.jl by defining
6565`eom!(::Type{Val{:jac}}, t, u, J) = jacob!(t, u, J)`.
@@ -165,6 +165,12 @@ ODEProblem(ds::ContinuousDS, tspan::Tuple, state = ds.prob.u0) =
165165ODEProblem {true} (ds. prob. f, state, tspan,
166166callback = ds. prob. callback, mass_matrix = ds. prob. mass_matrix)
167167
168+ """
169+ ODEProblem(ds::ContinuousDS, t, state = ds.prob.u0 [, callback])
170+ Create a new `ODEProblem` for the given dynamical system that final time `t` (or `tspan`
171+ for tuple `t`), `state` and if given, also merges the `callback` with other existing
172+ callbacks currently in `ds.prob`.
173+ """
168174function ODEProblem (ds:: ContinuousDS , t:: Real , state, cb)
169175 if ds. prob. callback == nothing
170176 return ODEProblem {true} (ds. prob. f, state, (zero (t), t),
299305"""
300306 get_sol(prob::ODEProblem [, diff_eq_kwargs::Dict, extra_kwargs::Dict])
301307Solve the `prob` using `solve` and return the solutions vector as well as
302- the time vector.
308+ the time vector. Always uses the keyword argument `save_everystep=false`.
303309
304310The second and third
305311arguments are optional *position* arguments, passed to `solve` as keyword arguments.
0 commit comments