GSoC Blog: Community Bonding & First Evaluation
Hello Everyone! So I am here to present my work and contributions I made before the first evaluation in Google Summer of Code 2020. The project is under the supervision of The Julia Language. It also includes the details of what I did in the community bonding period as well.
First Thoughts
It’s thrilling to be a part of this community with so much to learn. Mostly, the people are here from a research background, and it becomes fascinating to learn new science paradigms and deep-diving into research papers.
Community Bonding Period
My first task was to optimise and look into existing issues in BDF & NDF methods. We already had some implementation of these methods in our code-base, but it seems that it wasn’t working well with the stiff problems. So my first task was to get acquainted with the theory and isolating the problem. What I liked about SciML was that we have broad interoperability with various languages. The users could easily extract ODE Solvers from MATLAB, Sundials, SciPy etc. and run them in their Julia code. These APIs were designed to compare benchmarks and robustness of our solvers with existing ones. I spent most of my reading Shampine’s paper of MATLAB ODE Suite and working out on optimising it. I also skimmed through Hairer I & II for BDF methods to learn more them and generally about ODE solvers. I interacted with my mentors and discussed my project and how to proceed to optimise these methods
Week 1-4 (till First Evaluation)
BDF & NDF methods
Basically, a BDF method is a family of linear-multistep implicit methods which are used primarily for stiff problems. A derived family of methods from BDF, called NDF methods, possesses the same A-stability and better accuracy than BDF methods. With constant step-size in intervals, these are called as QNDF methods. I tried to isolate the problems and worked on the adaptive step-sizing. It involved minor bug fixes, moving adaptivity to controllers.jl and most importantly implementing quasi-constant step-sizing in the algorithm. It solved the divergence problem it previously had encountered in Stiff ODE Work-precision diagrams and is working well in decent tolerances.
Here are some benchmarks I tested with QNDF:
I also added an implementation of DEstats from MATLABDiffEq.jl. It abstracts some of the common statistics which a particular solver generates. As the primary objective of my proposal, I also worked on miscellaneous fixes and optimisations here and there in DifferentialEquations.jl.
Implementing 4-5th order Kennedy-Carpenter methods
Most of my work was done with BDF methods, so my mentors suggested to move to my next sub-project. It was more of “implementation” based, and I had to implement ESIDRK KenCarp methods which could be considered as an improvement over existing KenCarp methods. It generally consisting of Split-ODE & ODE Problems. It took me some time to figure stage predictors in these methods as they are really crucial in the speed and accuracy of the result. There’s no sound theory as to what one may use to optimise them, but it worked with 3rd-Order Hermite interpolation. The results we pretty robust and could be touted as one of the best solvers for Stiff-ODE.
Here are some benchmarks I tested for these methods (High Tolerances):
-
KenCarp47 (4th Order ESDIRK Method with splitting)
Allen Cahn Work Precision Diagrams POLLU Work Precision Diagrams ROBER Work Precision Diagrams -
KenCarp58 (4th Order ESDIRK Method with splitting)
Allen Cahn Work Precision Diagrams POLLU Work Precision Diagrams ROBER Work Precision Diagrams
List of Contributions
OrdinaryDiffEq.jl
Description | Pull Requests | Current Status |
---|---|---|
Failed step handling in NDF | #1125 | Merged |
Conditions for order and step change in NDFs | #1130 | Merged |
Migrating NDF methods to controllers.jl | #1132 | Merged |
Update QNDF1 to new multistep solver | #1158 | Merged |
Update QNDF2 to new multistep solver | #1164 | Merged |
Update QNDF to new multistep solver | #1165 | Merged |
Adaptivity fixes in QNDF | #1173 | Open |
Adding new Kennedy Carpenter 4th order methods | #1177 | Merged |
Fix redundant copies of tdir_t in tstops heap |
#1178 | Merged |
Adding new Kennedy Carpenter 5th order methods | #1187 | Merged |
KenCarp47 and KenCarp58 tests | #1189 | Merged |
Split methods test timeout fix in Travis | #1192 | Merged |
MATLABDiffEq.jl
Description | Pull Requests | Current Status |
---|---|---|
Importing MATLAB Solver stats to DiffEq | #20 | Merged |
Change saveat handling similar to DiffEq | #18 | Merged |
DiffEqDocs.jl
Description | Pull Requests | Current Status |
---|---|---|
Fix Typos and added new KenCarp methods | #377 | Merged |
Future Goals
I would be working on Implicit & Explicit Extrapolation Methods and try to optimise and improve them. I would like to also work on general fixes in ODE solvers in OrdinaryDiffEq.jl. Till then, happy coding!