This repository was archived by the owner on Sep 9, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 47
This repository was archived by the owner on Sep 9, 2024. It is now read-only.
API for ODE solvers #20
Copy link
Copy link
Closed
Labels
Description
This is a summary of the discussions in #7 and #4 and intended to reflect the latest decisions about the API.
Each (adaptive) solver accepts 3 arguments (PR in #14 )
F: the RHS of the ODEdy/dt = F(t,y), which is a function oftandy(t)and returnsdy/dt::typeof(y)y0: initial value (no type specified -> duck typing)tspan: an array of points at which the solution is requested (length(tspan)>=2), the elements can be ordered ascending or descending (see ode45 should support stepping from high to low and support a vector of steps #2)
Moreover, the following keywords are supported
norm: user-supplied norm for determining the errorE(defaultBase.norm)abstoland/orreltol: an integration step is accepted ifE <= abstol || E <= reltol*abs(y)(ideally we want both criteria for all solvers, done in Use keyword arguments to set the tolerance #13)points=:all | :specified | :final: controls the type of output according topoints==:all(default) output is given for each value intspanas well as for each intermediate point the solver used.points==:specifiedoutput is given only for each value intspan.points==:finaloutput is given only for the last value intspan, i.e. at the end of integration (speculative).
maxstep,minstepandinitstep: determine the maximal, minimal and initial integration step.
The solver returns two arrays (PR in #14)
tout: points at which solutions were obtained (also see keywordpoints)yout: solutions at timestout; ifpoints=:all | :specifiedis used,yout::Vector{typeof(y0)}. For
points==:finalthe solution at the end of the integrationyout::typeof(y0)is returned (speculative).
If we we decide to support non-adaptive solvers (see #9), those should have the same arguments and return values.
Reactions are currently unavailable