Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrap FFT for specific array structures in Exponax #4

Merged
merged 15 commits into from
Sep 2, 2024
Merged

Conversation

Ceyron
Copy link
Owner

@Ceyron Ceyron commented May 16, 2024

No description provided.

@Ceyron Ceyron changed the base branch from main to dev September 2, 2024 07:04
@Ceyron Ceyron merged commit 545fd3f into dev Sep 2, 2024
1 check passed
@Ceyron Ceyron deleted the wrapped-fft branch September 2, 2024 10:33
Ceyron added a commit that referenced this pull request Oct 23, 2024
* 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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant