-
-
Notifications
You must be signed in to change notification settings - Fork 49
Conversation
Nice work! Are stiff solvers generalizable in the same way we've generalized |
In principle this should be possible. The Rosenbrock methods (see e.g. generalized rosenbrock formulation and of course Hairer & Wanner) seem to be very similar to RK methods. In Solving Ordinary Differential Equations, II Hairer & Wanner even write that one can basically take DOPRI5 and add a few lines of code for the Jacobian and solving linear systems and et voilà ... (well almost) In the long run we probably want to have something more general (and not only Rosenbrock based), but for now |
Changes Unknown when pulling f25ef27 on acroy:ode23s into * on JuliaLang:master*. |
Isn't cvode good enough for stiff problems? |
Sure. And right now it is probably better/faster/more reliable for almost any problem. But it depends on the Sundials library, while in ODE.jl we are trying to collect pure Julia implementations. This allows it for example to use |
Ok. Thanks - I thought as much, but good to have the confirmation. |
Anyone minds if we merge this (after I cleaned up my commits)? |
I'd say go ahead with the cleanup and merging. I do know enough about ode23s to review the code, but we can fix issues as they come up. |
…ple) and make fdjacobian available to all solvers.
I agree. And the likelihood of finding an issue is much bigger if the method is on master. |
Add solver ode23s for stiff problems (based on modified Rosenbrock triple).
The implementation is based on the "modified Rosenbrock triple" described in
which is also the basis for MATLAB's
ode23s
. In addition to the usual keywords, the solver accepts a keywordjacobian
, which can be used to supply a function giving the Jacobian of the RHS. Otherwise a (very crude) finite-difference method is used (pulled out fromoderosenbrock
).A simple example is:
Yielding for the first component of
![ode23s-vdp1000](https://cloud.githubusercontent.com/assets/6170781/4168694/96fff46c-351f-11e4-98bb-9545faa66977.png)
yout
This PR should also "fix" #1.