trixi-framework / trixi-framework/Trixi.jl
AD: Extend differentiable programming
- Dominant language
- Julia
- Stars
- 731
- Forks
- 166
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 25
Description
The first steps towards differentiating through Trixi were made in #461. The next steps outlined there are
- [x] Benchmark and improve performance of `jacobian_ad_forward` (#464)
- [x] Allow differentiating through a complete solve including time integration (#464)
- [ ] Make callbacks differentiable
- [x] `AnalysisCallback` (#487)
- [ ] `SaveRestartCallback` and `SaveSolutionCallback`: Shall they save the dual numbers or the underlying plain floats (using `Printf.tofloat` in Julia v1.6)? Decision in Trixi meeting: Save the floats for now until we need the more complicated part.
- [ ] `AMRCallback`: Needs improvement of the indicators, see below
- [ ] `VisualizationCallback`: We should probably only visualize the real parts, e.g. using `Printf.tofloat`
- [ ] Fix indicators and shock-capturing volume integrals (issue explained in https://github.com/trixi-framework/Trixi.jl/pull/461#issue-590688249, tracked in https://github.com/trixi-framework/Trixi.jl/issues/1252)
- [ ] Check Euler+gravity
- [ ] Adapt the mesh types to allow differentiating geometric parameters
- [ ] Look for matrix coloring techniques and return sparse matrices to speed-up the computation
- [x] Can we use something like Measurements.jl? (#522)
- [x] Can we use ModelingToolkit.jl?
- Currently not, at least not directly (https://github.com/SciML/ModelingToolkit.jl/issues/929)
- [x] What about other modes of AD, e.g. reverse mode or something like the other tools used in Flux.jl?
- Most of them do not support mutating operations, so they are not really useful for us.
- [ ] What about [Enzyme.jl](https://github.com/wsmoses/Enzyme.jl)? It promises to support mutating operations and works at the LLVM level
- [ ] Check [Tapir.jl](https://juliahub.com/ui/Packages/General/Tapir)
- [ ] Integration with ChainRules to make some parts more efficient, e.g. by using the explicit formulae of Jesse Chan and his student?
- This does currently not work in general since ChainRulesCore does not support mutating operations (https://github.com/JuliaDiff/ChainRulesCore.jl/issues/242). However, it would still be nice to see whether we can get more efficient versions using these explicit formulae.
- Maybe we can provide chain rules for some of the core methods (logarithmic mean, numerical fluxes) to speed up the calculations?
Contributor guide
Assessment
This issue has not been assessed yet.