Giter Site home page Giter Site logo

alexfikl / pyshocks Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 1.0 775 KB

Automatic Differentiation + Adjoint + Shocks Experiments

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

License: MIT License

Makefile 0.98% Python 87.84% TeX 11.18%
adjoint-method automatic-differentiation jax shocks weno

pyshocks's Introduction

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

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

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

cd docs && make html
xdg-open _build/html/index.html

Sphinx ca can also generate LaTeX documentation with

make latex && cd _build/latex && make
xdg-open pyshocks.pdf

The documentation is also hosted on readthedocs.

pyshocks's People

Contributors

alexfikl avatar dependabot[bot] avatar

Watchers

 avatar  avatar  avatar

Forkers

djbodony

pyshocks's Issues

PyWENO not building

PyWENO does not seem to declare its dependencies properly, so uv pip compile fails to build it. We can still install it manually, but that's not a great sign..

We could:

  • Update the PyWENO build system?
  • Drop it? Any other nicer python WENO implementations?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.