Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexfikl/pyshocks
Automatic Differentiation + Adjoint + Shocks Experiments
https://github.com/alexfikl/pyshocks
adjoint-method automatic-differentiation jax shocks weno
Last synced: 2 months ago
JSON representation
Automatic Differentiation + Adjoint + Shocks Experiments
- Host: GitHub
- URL: https://github.com/alexfikl/pyshocks
- Owner: alexfikl
- License: mit
- Created: 2022-03-12T01:42:36.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-08T07:24:23.000Z (4 months ago)
- Last Synced: 2024-10-12T13:46:30.847Z (3 months ago)
- Topics: adjoint-method, automatic-differentiation, jax, shocks, weno
- Language: Python
- Homepage: https://pyshocks.readthedocs.io
- Size: 838 KB
- Stars: 1
- Watchers: 4
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.rst
- License: LICENSES/CC0-1.0.txt
Awesome Lists containing this project
README
.. image:: https://github.com/alexfikl/pyshocks/workflows/CI/badge.svg
:alt: Build Status
:target: https://github.com/alexfikl/pyshocks/actions?query=branch%3Amain+workflow%3ACI.. image:: https://readthedocs.org/projects/pyshocks/badge/?version=latest
:alt: Documentation
:target: https://pyshocks.readthedocs.io/en/latest/?badge=latestAbout
=====This repository contains some preliminary experiments on performing adjoint-based
optimization of systems with shocks by using automatic differentiation. The
main goal is to get it working for the one-dimensional unsteady Euler equations
with common WENO schemes.It is currently quite far from that goal, so this is **very experimental**.
**Caution**: As you might be able to tell, development on this has pretty much
stopped at this point. The code is still updated for newer versions of things
(``jax`` and ``numpy``), but no new features are added.Requirements
============The project currently supports Python 3.8 and later. The (full) requirements are
listed in ``pyproject.toml``.* ``jax`` and ``jaxlib``: base numeric and automatic differentiation package
used throughout. See
`JAX support policy `__
for details on supported versions.
* ``rich``: recommended for nicer logging.
* ``matplotlib`` and ``SciencePlots``: recommended for nicer plotting.For development, it is recommended to run
.. code:: bash
python -m pip install -e '.[dev,vis]'
A pinned version of all the requirements is kept in ``requirements.txt``.
For a quick install with the versions that are currently being tested on the CI.. code:: bash
python -m pip install -r requirements.txt -e .
or use ``requirements-dev.txt`` to also install development packages
(e.g. ``ruff``).Documentation
=============Documentation can be generated using `Sphinx `__.
For example, to generate a nice HTML-based variant go.. code:: bash
cd docs && make html
xdg-open _build/html/index.htmlSphinx ca can also generate LaTeX documentation with
.. code:: bash
make latex && cd _build/latex && make
xdg-open pyshocks.pdfThe documentation is also hosted on
`readthedocs `__.