alexfikl / pyshocks

Automatic Differentiation + Adjoint + Shocks Experiments

Home Page:https://pyshocks.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

Documentation

About

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.

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

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

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

Sphinx ca can also generate LaTeX documentation with

The documentation is also hosted on readthedocs.

About

Automatic Differentiation + Adjoint + Shocks Experiments

https://pyshocks.readthedocs.io

License:MIT License


Languages

Language:Python 87.8%Language:TeX 11.2%Language:Makefile 1.0%