Skip to content

Commit

Permalink
Proper Release alongside paper (#59)
Browse files Browse the repository at this point in the history
* Also run pre-commit on dev

* Update docs requirements

* Remove old requirements

* Remove no longer needed setup.py

* No longer target incompatible Python versions

* Add credits and improve settings

* Wrap FFT for specific array structures in Exponax (#4)

* Add custom wrapped FFT calls

* Rewrite derivative routines to use wrapped FFT calls

* Make number of spatial dims optional

* Run black

* Correctly declare as optional

* Use wrapped routines

* Use wrapped routines

* Use wrapped routines

* Use wrapped routines

* Use wrapped routines

* Use wrapped routines

* Export the spectral submodule

* Add more details on usage

* Start documentation of spectral module

* Stepper restructure (#21)

* Move reaction into stepper

* Adapt imports in tests

* Move linear timesteppers into separete files

* Move generic physical stepper into submodule

* Rename to nonlinear

* Correctly export in submodule

* Move utilities

* Export generic utilities

* Fully translate linear generic stepper

* Fully translate convection stepper

* Fully translate generic nonlinear stepper

* Fully translate generic Gradient norm stepper

* Correctly forward dealiasing fraction

* No need to set dealiasing fraction

* Fully translate generic polynomial stepper

* Don't translate vorticity convection

* Remove normalized submodule

* Remove no longer relevant exports

* Export generic stepper

* Fix issues with dealiasing_fraction arguments

* Adapt tests

* Remove commented sections

* Adapt cross-references

* New docs layout to better reflect the API

* Add a boilerplate for the overview

* Consistent docs (#26)

* Add documentation to base

* Add documentation to etdrk core

* Adapt to Equinox style

* Change to Equinox style

* Change to Equinox style

* Change to Equinox style

* Fix typo

* Consistent documentation

* Improve nonlin fun base documentation

* Change to Equinox style

* Improve docs for convection

* Improve docs for gradient norm

* Improve docs for combined general nonlinearity

* Fix docstring

* Improve and fix documentation

* Fix broken link

* Adapt to Equinox style

* Improve documentation

* Add clarification

* better wording

* Fix convection difficulty computation

* Improve doc of generic gradient norm stepper

* Add docstring

* Add documentation

* Add documentation

* Add documentation

* Use correct tuple typing (#27)

* Add type hints (#28)

* Fourier repeated stepper (#29)

* Implement logic of fourier substepping

* Forward .step() to call signature with shape check

* Add hints from Base Stepper

* Add hints on cost-saving

* Also add hint to constructor

* Add a test for the new repeated stepper

* Add CI for running a test on PRs

* Fix repeated Python versions

* Fourier Interpolation and Up/Downsampling (#33)

* Add simple Fourier interpolator

* Add 1D tests

* Add tests in 2d

* Loosen tests

* Fix the generalization to 2d

* Add tests in 3d

* Forward indexing convention

* Correctly use ellipsis

* Add documentation

* Add documentation

* Add utility to get modes slices

* Add test for mode slice generation

* Return tuples

* Utility to move between resolutions

* Add tests for mapping between resolutions

* Fix issue with oddball sanity

* Add new utilities to documentation

* Add documentation

* Add return type hint

* Simple showcase of new functions

* Properly rerun notebook

* Add PyTest dependency

* Fix tests to use tuples

* Loosen requirements on (decaying) Burgers problem

* Add requirement on 3d volume renderer

* Use quotes to correctly get 3.10

* Ignore test requiring GPU

* Remove vape dependency because we no longer test for it

* Spectral updates (#35)

* Preliminary function to compute the spectrum

* Potential improvement to spectrum computation

* Add hint on enstrophy

* Fix on wavenumber norm computation

* Rename to better reflect its effect on oddball mode

* Add tests on filter mask

* Improve first half of spectral documentation

* Merge common subexpressions

* Extend and fix documentation

* Add experimental convinience function to extract the Fourier coefficients

* Unify the creation of scaling arrays

* Test scaling array for norm_compensation

* Add tests for coefficient extraction in 1D

* Test for coefficient extration in 2D

* Enhance docstring

* Remove experimental function

* Fix spectrum function

* Export get_spectrum instead of make_incompressible

* Adapt docs

* Use proper links

* Enhance docstring

* Enhance docstring

* Test the spectrum creation

* Restructure docstring

* Tests helper utilities for fft setup

* Hyperviscous kdv [BREAKING] (#36)

* Have the dispersion operator being created seperately

* Make KdV hyper-viscous by default

* Remove unnecessary copy

* Requires new coefficients to work with changed defaults in KdV

* Fourier Coefficient Extractor (#38)

* Add function

* Enhance docstring

* Change rounding default

* Add coefficient extractor to docs

* Quicker spectrum in 1D

* More validation (#39)

* Add note

* Add 2d and 3d advection

* Add diffusion analytical solution in 2D

* Add diffusion test in 3D

* Ensure all presets are working

* Employ a fix for single facets

* Use Exponax viz routines

* Also employ fix for faceted animations

* Fix defaults for Kolmogorov

* Change to exponax viz routines

* Add 3D dynamics

* Add hint on where to find the reference qualitative rollouts

* Re-Execute Notebook

* Re-Execute Notebook

* Re-Execute notebook

* Start with a validation notebook for KdV

* Test if KdV without convection is purely linear

* Finished KdV soliton comparison

* Faster way to compute the spectrum binning in higher dimensions

* Improved version of kolmogorov comparison

* Improved Metrics System (#40)

* Start implementing metrics tests

* Starting a notebook on validating the metrics

* [WIP] Start generalizing the fourier nRMSE to allow for derivative based losses

* Set up a new structure for metrics

* New export structure

* Overwrite the existing metrics submodule

* Adapt tests because domain_extent is now considered correctly

* Test against analytical solution

* Fix parameterization of test

* Start set up with a new fourier metrics implementation

* Ensure correct shape

* Add first test on Fourier aggregation

* Add basic abolute metrics, more TODO

* Port the correlation metric

* New API in docs

* Port new spatial metrics to API docs

* Rework correlation documentation

* Add drafts on an advanced background notebook on metrics and their relation to functional norms

* Fix the scaling in the Fourier aggregation

* Use pytest approx

* Fix scaling

* Add equivalence test of Fourier and spatial aggregation

* Rework implementations

* Remove mean correlation

* Add soboleb based metrics

* Add helper function to apply metric functions on batched states

* Test with non-unit domain

* Start with a low-level introduction to metrics

* Add basics notebook

* Adapt API docs

* Add to API docs

* Add documentation to spatial metrics

* Reference does not be zero in normalized metrics

* Add documentation

* Fix documentation

* Test Sobolev against manual adding of derivatives with fourier-base metrics

* Fix typo

* Add documentation

* Add tests on Filtering

* Add notes on preliminary notebook

* Fix broken links

* Also add warning to advanced metrics notebook

* Continue with the metric convergence notebook, still WIP

* Add example on Sobolev usage

* Finish validation notebook

* Add temporal convergence notebook (#41)

* Add warning for KS conservative in higher dimensions

* Symmetric Metrics & Metrics improvements (#44)

* Extend docstring for symmetric metrics

* Improve aggregator docstring

* Fix that identity is only guaranteed for L^p norm

* Fix docstring

* Implement symmetric mode

* Fix missing sqrt

* Add symmetric versions for MAE, MSE, and RMSE

* Add new symmetric metrics to documentation

* Add test for symmetric metrics

* Ensure mean is only taken over axis zero in case there are additional axes

* Add details

* Add non-conservative convection term (#46)

* add non-conservative convection term

* fix errors in docstring

* update docstring

* use the dealiased value for non-conservative convection

* Fix non-forwarded conservative flag

* Small Improvements to Gaussian Random Field (#48)

* Retain mean mode from white noise

* Add comment on why there is a 2.0 in denominator

* Polynomial Stepper Fix (#49)

* Have general diffusion coefficient consisten with norm/diff

* Use correct sign on quadratic nonlinearity

* Conservative KS should use conservative convection (#50)

* Conservative KS should use conservative convection

* Adapt tests

* Consistent Generic Steppers (#52)

* Use consistent attribute names

* Forward API changes to tests

* Forward changes to qualitative rollout

* Ensure single-channel convection nonlin is conservative (#53)

* Rework KS Attributes (#54)

* Remove name of diffusivities from combustion KS

* Remove name of diffusivities from conservative KS

* Foward changes to tests

* Fix missing factor of 0.5

* Rework 1D example notebook

* Docs tweak (#55)

* Change to proper markdown

* Add KS conservative docstring

* Re-Execute IC notebook

* Rerun general and normalized notebookt

* Rerun subclassing example

* Rerun showcase 2D

* Add solver overview in 3D

* Add 3D Solver overview to docs

* Automatically deduce version number

---------

Co-authored-by: Qiang <137192063+qiauil@users.noreply.github.com>
  • Loading branch information
Ceyron and qiauil authored Oct 23, 2024
1 parent 8959079 commit 56becef
Show file tree
Hide file tree
Showing 160 changed files with 78,534 additions and 49,822 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pre_commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
push:
branches:
- main
- dev

jobs:
pre-commit:
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Run tests

on:
pull_request:

jobs:
run-test:
strategy:
matrix:
python-version: [ "3.10", "3.11", "3.12" ]
os: [ ubuntu-latest ]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r ./tests/requirements.txt
- name: Checks with pre-commit
uses: pre-commit/action@v2.0.3

- name: Test with pytest
run: |
python -m pip install .
python -m pytest tests/
160 changes: 0 additions & 160 deletions .gitignore copy

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Convection

::: exponax.normalized.DifficultyConvectionStepper
::: exponax.stepper.generic.DifficultyConvectionStepper
options:
members:
- __init__
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Gradient Norm

::: exponax.normalized.DifficultyGradientNormStepper
::: exponax.stepper.generic.DifficultyGradientNormStepper
options:
members:
- __init__
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Linear

::: exponax.normalized.DifficultyLinearStepper
::: exponax.stepper.generic.DifficultyLinearStepper
options:
members:
- __init__
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Nonlinear

::: exponax.normalized.DifficultyGeneralNonlinearStepper
::: exponax.stepper.generic.DifficultyNonlinearStepper
options:
members:
- __init__
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Polynomial

::: exponax.normalized.DifficultyPolynomialStepper
::: exponax.stepper.generic.DifficultyPolynomialStepper
options:
members:
- __init__
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Convection

::: exponax.normalized.NormalizedConvectionStepper
::: exponax.stepper.generic.NormalizedConvectionStepper
options:
members:
- __init__
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Gradient NormA

::: exponax.normalized.NormalizedGradientNormStepper
::: exponax.stepper.generic.NormalizedGradientNormStepper
options:
members:
- __init__
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

::: exponax.normalized.NormalizedLinearStepper
::: exponax.stepper.generic.NormalizedLinearStepper
options:
members:
- __init__
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Nonlinear

::: exponax.normalized.NormalizedGeneralNonlinearStepper
::: exponax.stepper.generic.NormalizedNonlinearStepper
options:
members:
- __init__
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Polynomial

::: exponax.normalized.NormalizedPolynomialStepper
::: exponax.stepper.generic.NormalizedPolynomialStepper
options:
members:
- __init__
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# General Convection Stepper

::: exponax.stepper.GeneralConvectionStepper
::: exponax.stepper.generic.GeneralConvectionStepper
options:
members:
- __init__
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# General Gradient Norm Stepper

::: exponax.stepper.GeneralGradientNormStepper
::: exponax.stepper.generic.GeneralGradientNormStepper
options:
members:
- __init__
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# General Linear Stepper

::: exponax.stepper.GeneralLinearStepper
::: exponax.stepper.generic.GeneralLinearStepper
options:
members:
- __init__
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# General Nonlinear Stepper

::: exponax.stepper.GeneralNonlinearStepper
::: exponax.stepper.generic.GeneralNonlinearStepper
options:
members:
- __init__
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# General Polynomial Stepper

::: exponax.stepper.GeneralPolynomialStepper
::: exponax.stepper.generic.GeneralPolynomialStepper
options:
members:
- __init__
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# General Vorticity Convection Stepper

::: exponax.stepper.GeneralVorticityConvectionStepper
::: exponax.stepper.generic.GeneralVorticityConvectionStepper
options:
members:
- __init__
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 0 additions & 7 deletions docs/api/stepper/normalized/vorticity_convection.md

This file was deleted.

23 changes: 23 additions & 0 deletions docs/api/stepper/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Overview

`Exponax` comes with many pre-built dynamics. They are all based on the idea of
solving semi-linear PDEs

$$
\partial_t u = \mathcal{L} u + \mathcal{N}(u)
$$

where $\mathcal{L}$ is a linear operator and $\mathcal{N}$ is a non-linear
differential operator.

TODO: add classification of dynamics based on:

- linear or nonlinear or reaction-diffusion
- specific (i.e. concrete equations like advection, Burgers etc.) or generic
based on providing a collection of linear and nonlinear coefficients
- if generic: whether it uses a physical, normalized or difficulty-based
interface
- in higher dimensions: whether it behaves isotropic or anisotropic (with
different coefficients per direction)

Then the resulting behavior can also be classified into ...
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Allen-Cahn

::: exponax.reaction.AllenCahn
::: exponax.stepper.reaction.AllenCahn
options:
members:
- __init__
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Cahn-Hilliad

::: exponax.reaction.CahnHilliard
::: exponax.stepper.reaction.CahnHilliard
options:
members:
- __init__
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Fisher-KPP

::: exponax.reaction.FisherKPP
::: exponax.stepper.reaction.FisherKPP
options:
members:
- __init__
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Gray-Scott

::: exponax.reaction.GrayScott
::: exponax.stepper.reaction.GrayScott
options:
members:
- __init__
Expand Down
Loading

0 comments on commit 56becef

Please sign in to comment.