-
-
Notifications
You must be signed in to change notification settings - Fork 48
Inspiration from PETSc ODE/DAE solvers for API and algorithms #30
Description
This is to propose to support the API PETSc uses for its ODE/DAE solvers.
I think the PETSc framework is the nicest around and the most modern (afaik).
(Other issues related are #20, #18, JuliaLang/julia#75)
The PETSc ODE/DAE solvers have been implemented over the last few years with modern developments in mind (they are citing papers from 2003, 2009), which is more than can be said for most other suites of ODE solvers which carry decades old ballast around. It supports, explicit, implicit and IMEX methods for ODEs and DAEs all within the same API. The API is based around formulating the problem like
F(t, u, u') = G(t, u)
For problems using implicit methods this is used as F(t, u, u') =0
for
explicit ones to u'=G(t, u)
(i.e. F=u'
), IMEX mixes the two at once.
Best have a look at the PETSc manual which gives a nice concise intro (Chapter 6):
http://www.mcs.anl.gov/petsc/petsc-current/docs/manual.pdf
PETSc has a liberal licence so code could probably be translated
from PETSc into Julia. The problem with that approach is that
one needs to understand the whole PETSc framework, otherwise
the code looks quite obfuscated.
Further, some cool solvers PETSc has:
- General linear methods:
http://www.mcs.anl.gov/petsc/petsc-3.4/docs/manualpages/TS/TSGL.html#TSGL
These methods contain Runge-Kutta and multistep
schemes (e.g. BDF) as special cases. As far as I can tell with
my limited ODE/DAE solver knowledge, these are the best
currently available. - IMEX: implicit explicit methods
http://www.mcs.anl.gov/petsc/petsc-3.4/docs/manualpages/TS/TSARKIMEX.html
"These methods are intended for problems with well-separated
time scales, especially when a slow scale is strongly nonlinear
such that it is expensive to solve with a fully implicit
method."
Disclaimer: I have not actually used the PETSc solvers, just read
the docs and wished I could use them in Matlab...