Julia for Education: Package Selection

That list is old and came before some of our newer libraries. It now tends to look like:

Problem type Associated Julia packages
Plotting Plots
Linear system / least squares LinearSolve
Sparse matrix SparseArrays
Interpolation/approximation DataInterpolations, ApproxFun
Polynomial roots Polynomials
Rootfinding NonlinearSolve
Finite differences FiniteDifferences, FiniteDiff
Integration Integrals
Optimization Optimization
Initial-value problem DifferentialEquations
Boundary-value problem DifferentialEquations
Method of lines MethodOfLines (still under development)
Automatic Differentiation ForwardDiff, Enzyme, DiffEqSensitivity
Fast Fourier Transform FFTW
Acausal Modeling / DAEs ModelingToolkit
Symbolic CAS Symbolics
Changes:
  • If you use LinearSolve.jl, IterativeSolvers, Preconditioners, etc. are abstracted away. Besides, you don’t actually want to use IterativeSolvers, and Preconditioners is missing most preconditioners, etc. I’ll have a whole JuliaCon talk on this.
  • QuadGK is only one dimensional and doesn’t handle infs automatically. Nor is it differentiable with reverse mode. Integrals handles of those details. It still needs a bit of work, but it at least automates a lot of what’s needed.
  • NLsolve can have odd performance issues here and there (see the performance difference against NonlinearSolve Porting from Python optimize.broyden2 - #4 by ChrisRackauckas), so NonlinearSolve instead. NonlinearSolve is also differentiable by default. It still needs to get an upgrade to its linear solver interface though, in the near future it will match DiffEq in how it uses LinearSolve.jl as its linear solver.
  • I intend to add an interface for EigenvalueProblem to LinearSolve as well, so that it similarly has a unified interface for linear eigenvalue problems. I don’t think any student should ever have to learn what Arpack.jl is, that seems like a kludge to me.
  • DataInterpolations.jl for splines. Again, automatic differentiation support, more algorithms, etc.
  • Acausal and causal modeling is very important for engineering students. This is Modelica and Simulink stuff, now ModelingToolkit is what we’re incorporating into the classroom. Very early classroom experiments at this point.
  • Symbolics.jl for the CAS part just added to the list, since it’s used all over.
  • I think any modern scientific computing course needs to teach automatic differentiation and adjoint methods.

And we have the refocused https://docs.sciml.ai/dev/ mirroring that story, designed with examples which integrate all of these libraries into full workflows.

Mainly, NonlinearSolve.jl missing LinearSolve integration to fully show off preconditioned Newton-Krylov for nonlinear systems, Integrals just needs a bit of work in general (just like 1 week though) for polish, MTK is still on the new side, DataInterpolations.jl needs multi-dimensional interpolations, and we need to put doctests on everything. Then we need to fix our tutorials generation server, put out another series of video tutorials, and are finishing up some docstrings. That’s part of the summer plan that we have going with our various developer and student programs.

23 Likes