https://github.com/byuflowlab/implicitad.jl
Automates steady and unsteady adjoints (general solvers and ODEs respectively). Forward and reverse mode algorithmic differentiation around implicit functions (not propagating AD through), as well as custom rules to allow for mixed-mode AD or calling external (non-AD compatible) functions within an AD chain.
Science Score: 57.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 3 DOI reference(s) in README -
✓Academic publication links
Links to: arxiv.org -
○Academic email domains
-
✓Institutional organization owner
Organization byuflowlab has institutional domain (flow.byu.edu) -
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.8%) to scientific vocabulary
Keywords
Repository
Automates steady and unsteady adjoints (general solvers and ODEs respectively). Forward and reverse mode algorithmic differentiation around implicit functions (not propagating AD through), as well as custom rules to allow for mixed-mode AD or calling external (non-AD compatible) functions within an AD chain.
Basic Info
Statistics
- Stars: 29
- Watchers: 4
- Forks: 8
- Open Issues: 3
- Releases: 4
Topics
Metadata Files
README.md
ImplicitAD.jl
Summary: Automate steady and unsteady adjoints.
Make implicit functions compatible with algorithmic differentiation (AD) without differentiating inside the solvers (discrete adjoint). Even though one can sometimes propagate AD through a solver, this is typically inefficient and less accurate. Instead, one should use adjoints or direct (forward) methods. However, implementing adjoints is often cumbersome. This package allows for a one-line change to automate this process. End-users can then use your package with AD normally, and utilize adjoints automatically.
We've also enabled methods to efficiently compute derivatives through explicit and implicit ODE solvers (unsteady discrete adjoint). For the implicit solve at each time step we can apply the same methodology. However, both still face memory challenges for long time-based simulations. We analytically propagate derivatives between time steps so that reverse mode AD tapes only need to extend across a single time step. This allows for arbitrarily long time sequences without increasing memory requirements.
As a side benefit the above functionality easily allows one to define custom AD rules. This is perhaps most useful when calling code from another language. We provide fall backs for utilizing finite differencing and complex step efficiently if the external code cannot provide derivatives (ideally via Jacobian vector products). This functionality can also be used for mixed-mode AD.
Author: Andrew Ning and Taylor McDonnell
Features:
- Compatible with ForwardDiff and ReverseDiff (or any ChainRules compliant reverse mode AD package)
- Compatible with any solver (no differentiation occurs inside the solver)
- Simple drop in functionality
- Customizable subfunctions to accommodate different use cases (e.g., custom linear solvers, factorizations, matrix-free operators)
- Version for ordinary differentiation equations (i.e., discrete unsteady adjoint)
- Analytic overrides for linear systems (more efficient)
- Analytic overrides for eigenvalue problems (more efficient)
- Can provide custom rules to be inserted into the AD chain (e.g., interfacing with python). Provides finite differencing and complex step defaults for cases where AD is not available (e.g., calling another language). But can also provide Jacobians or JVP/VJPs.
Documentation:
- Start with the tutorial to learn usage.
- The API is described in the reference page.
- The math is particularly helpful for those wanting to provide their own custom subfunctions. See the theory and also some scaling examples in this PDF. A supplementary document deriving the linear and eigenvalue cases is available in the theory section.
Run Unit Tests:
julia
pkg> activate .
pkg> test
Citing:
Please cite the following preprint. DOI: 10.48550/arXiv.2306.15243
Other Packages:
Nonconvex.jl and ImplicitDifferentiation.jl are other implementations of the nonlinear portion of this package. SciML provides support for continuous unsteady adjoints of ODEs. They have also recently added an implementation for the nonlinear case.
Owner
- Name: BYU FLOW Lab
- Login: byuflowlab
- Kind: organization
- Location: Provo, UT
- Website: http://flow.byu.edu
- Repositories: 94
- Profile: https://github.com/byuflowlab
FLight, Optimization, and Wind
GitHub Events
Total
- Create event: 3
- Commit comment event: 4
- Release event: 1
- Watch event: 2
- Delete event: 1
- Issue comment event: 2
- Push event: 9
- Pull request event: 4
- Fork event: 2
Last Year
- Create event: 3
- Commit comment event: 4
- Release event: 1
- Watch event: 2
- Delete event: 1
- Issue comment event: 2
- Push event: 9
- Pull request event: 4
- Fork event: 2
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 6
- Total pull requests: 13
- Average time to close issues: 27 days
- Average time to close pull requests: 2 months
- Total issue authors: 4
- Total pull request authors: 9
- Average comments per issue: 3.0
- Average comments per pull request: 0.23
- Merged pull requests: 9
- Bot issues: 0
- Bot pull requests: 3
Past Year
- Issues: 1
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: 2 months
- Issue authors: 1
- Pull request authors: 1
- Average comments per issue: 1.0
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- taylormcd (3)
- gdalle (1)
- KapilKhanal (1)
- JuliaTagBot (1)
Pull Request Authors
- taylormcd (3)
- github-actions[bot] (3)
- BTV25 (2)
- rymanderson (2)
- fredrikekre (2)
- jmaack24 (2)
- juddmehr (1)
- dingraha (1)
- andrewning (1)
- gdalle (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- julia 57 total
- Total dependent packages: 3
- Total dependent repositories: 0
- Total versions: 6
juliahub.com: ImplicitAD
Automates steady and unsteady adjoints (general solvers and ODEs respectively). Forward and reverse mode algorithmic differentiation around implicit functions (not propagating AD through), as well as custom rules to allow for mixed-mode AD or calling external (non-AD compatible) functions within an AD chain.
- Documentation: https://docs.juliahub.com/General/ImplicitAD/stable/
- License: MIT
-
Latest release: 1.0.1
published 8 months ago
Rankings
Dependencies
- actions/checkout v2 composite
- julia-actions/cache v1 composite
- julia-actions/julia-buildpkg v1 composite
- julia-actions/julia-docdeploy v1 composite
- julia-actions/julia-runtest v1 composite
- julia-actions/setup-julia v1 composite
- JuliaRegistries/TagBot v1 composite