Is there a migration from DifferentialEquations.jl to subpackages cheat sheet?

I use a lot of different functionality in DifferentialEquations.jl, so to date I’ve been mostly happy just using this omnipackage. However, compile times are now quite long and I rarely need all the functionality in the same project, and it seems DifferentialEquations.jl might be (at least partially) retired in the near-to-mid future (DifferentialEquations.jl v8 · Issue #1086 · SciML/DifferentialEquations.jl · GitHub).

I was just wondering if there’s a handy guide or cheat sheet somewhere for what packages I need to pull and how to combine them to get any specific subfunctionality? If, for example, I want to solve a boundary-value problem, which packages do I need? What about SDEs? Automatic solver selection? Etc.

Sorry if this is in the DifferentialEquations.jl documentation somewhere and I just missed it.

The docs do already do this in the latest versions. For example,

import StochasticDiffEq as SDE
α = 1
β = 1
u₀ = 1 / 2
f(u, p, t) = α * u
g(u, p, t) = β * u
dt = 1 // 2^(4)
tspan = (0.0, 1.0)
prob = SDE.SDEProblem(f, g, u₀, tspan)
sol = SDE.solve(prob, SDE.EM(), dt = dt);
import Plots
Plots.plot(sol)

With the translation to v8, the system will be:

  • For ODEs, DifferentialEquations.jl (which will be the same as OrdinaryDiffEq.jl)
  • For SDEs, StochasticDiffEq.jl
  • For DDEs, DelayDiffEq.jl
  • For BVPs, BoundaryValueDiffEq.jl

etc.

But really it’s by problem type and solver. Solver sets mention the package for it, for example:

And then the question that isn’t well documented, because it’s a recent change, is where the default solver lies. About 1 month ago all default solvers were in DifferentialEquations.jl. Now there is a chosen package for each problem type which is the default solver.

I guess I have a question here, what would be the best way to convey this information?

1 Like

Thanks Chris! I think I probably only checked the “stable” documentation.

If I understand you correctly this means that by, e.g.,

by loading OrdinaryDiffEq.jl I would have access to, for example, the Rodas5P solver without explicitly loading OrdinaryDiffEqRosenbrock.jl?

And if I wanted to minimize my dependencies, I would load something like SciMLBase.jl and OrdinaryDiffEqRosenbrock.jl?

Regarding the defaults, perhaps the first subheader under “Solver Algorithms” could be “Default Solvers”. If it’s not too annoying, the information on the default could also be replicated for each of the “Problem Types” as well.

1 Like

Oh we should really split that page :sweat_smile:. Good points. I’ll take this back and give a stab at reformulating the docs to see if I can get it more coherent to this new form later today.

Right now OrdinaryDiffEq.jl and DifferentialEquations.jl still “have the whole world” and that will be until the OrdinaryDiffEq.jl v7 and DifferentialEquations.jl v8 major releases with the blog post announcing the break and dependency leaning. We are at a technical level almost ready for it (just need to finish a preconditioner interface change @Oscar_Smith and SDE default system move to StochasticDiffEq.jl), but I think we want to do a few rounds at the docs before we really are ready. The nice thing here is that we can change the docs any time before the breaking change, because writing the docs in a way where those things don’t exist all in the top level packages works on both versions, so we’re at that stage and trying to get it right before pulling the trigger.