Review of the past two weeks
In the last two weeks, my work can be summarized as two parts: Refactoring the boundary conditions convention in BoundaryValueDiffEq.jl and make the code more autodiff compatible.
- This is kind of old problems with BoundaryValueDiffEq.jl, detailed information can be checked in numerous issues: README example should use interpolation instead of indexing, Indexing in boundary conditions, and previous various attempt on resolving this: Boundary conditions should always use solution object. But finally got some time for this issue now: Boundary conditions should always use solution object and Use solution object in all solvers, the basic idea is to change the previous
bc
convention from indexing based:
1 | function bc!(residual, u, p, t) |
to interpolation based:
1 | function bc!(residual, u, p, t) |
The previous methods are overly focused on changing the inner value of a solution, which is difficult since there would be dual numbers in the solution, the current workaround is to changing the solution in the loss function, but in the Jacobian function building process, we just built a new one. Interesting that it does accelerate the solving process:
1 | # Current workaround |
1 | # Master branch |
While implementing changing to DifferentiationInterface.jl PR, another bug from NonlinearSolve.jl has been spotted: Access to undefined reference when solving problems with Dual of BigFloat and fixed by generalizing the nonlinear solving with dual number to every package: refactor: Move dual nonlinear solving to NonlinearSolveBase
Implementing infinite final time boundary value problems solver, check out how BVPSUITE have managed to done it.
More TODOs:
Complete the PR for refactoring BoundaryValueDiffEq.jl from SparseDiffTools.jl to DifferentiationInterface.jl
Start working on the implementation of infinite final time BVP solver, and will start on this when the above feature is done.