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

Expand Docs #6

Merged
merged 31 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
169132b
Move all resources into docs folder
Ceyron Jun 21, 2024
0c1c048
Embed design decisions
Ceyron Jun 21, 2024
65af20d
Embed design decisions
Ceyron Jun 21, 2024
56e9606
Intro to advection
Ceyron Jun 21, 2024
2b8b930
Add all linear time steppers
Ceyron Jun 21, 2024
84879f2
Ensure documentation displays correctly
Ceyron Jun 21, 2024
f2399ee
Add nonlinear problems
Ceyron Jun 21, 2024
94d6a08
Ensure documentation displays properly
Ceyron Jun 21, 2024
f8c90ec
Reformate for mkdocs
Ceyron Jun 21, 2024
0eda20e
Reformate for mkdocs
Ceyron Jun 21, 2024
85f5c48
Proxy setup of ICs to have reaction diffusion work
Ceyron Jun 21, 2024
dc88b81
Setup all reaction-diffusion steppers
Ceyron Jun 21, 2024
8aa4198
Comply with markdown
Ceyron Jun 21, 2024
8f4a9a0
Add docs for normalized and difficulty conversion utilties
Ceyron Jun 25, 2024
a78e726
Add docs to general steppers
Ceyron Jun 25, 2024
873af29
Fix spelling mistake
Ceyron Jul 5, 2024
55954a4
Adapt to name change
Ceyron Jul 5, 2024
fe23498
Add all normalized steppers
Ceyron Jul 5, 2024
ccff2fe
Add doc files for difficulty interface
Ceyron Jul 5, 2024
d062201
Add docs for all ICs
Ceyron Jul 5, 2024
d9ebc3c
Rework linking to make mkdocstrings work
Ceyron Jul 5, 2024
ff3fe36
Add documentation for metrics
Ceyron Jul 5, 2024
a204630
Export placeholder functions
Ceyron Jul 5, 2024
f533838
Ensure consistent naming
Ceyron Jul 5, 2024
38ccd63
Add docs for visualization routines
Ceyron Jul 5, 2024
c51c9e9
Add docs for smaller utility functions
Ceyron Jul 5, 2024
b855674
Add documentation for Poisson solver
Ceyron Jul 5, 2024
01b2b78
Add missing members selector
Ceyron Jul 5, 2024
77c7f63
Add ETDRK and base classes docs
Ceyron Jul 5, 2024
71cd9af
Add all documentation for the nonlinear functions
Ceyron Jul 5, 2024
0fddfd5
Enhance landing page
Ceyron Jul 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

<h1 align="center">
<img src="img/exponax_logo.png" width="200">
<img src="docs/imgs/exponax_logo.png" width="200">
<br>
Exponax
<br>
Expand All @@ -19,7 +19,7 @@
</p>

<p align="center">
<img src="img/teaser_demo.gif">
<img src="docs/imgs/teaser_demo.gif">
</p>

## Installation
Expand Down Expand Up @@ -57,7 +57,7 @@ plt.imshow(trajectory[:, 0, :].T, aspect='auto', cmap='RdBu', vmin=-2, vmax=2, o
plt.xlabel("Time"); plt.ylabel("Space"); plt.show()
```

![](img/ks_rollout.png)
![](docs/imgs/ks_rollout.png)

For a next step, check out the [simple_advection_example_1d.ipynb](examples/simple_advection_example_1d.ipynb) notebook in the `examples` folder, and check out the <a href="#documentation">Documentation</a>.

Expand Down Expand Up @@ -95,7 +95,7 @@ For a next step, check out the [simple_advection_example_1d.ipynb](examples/simp

The following Jupyter notebooks showcase the usage of the package:

1. [Simple Advection Example in 1d](examples/simple_advection_example_1d.ipynb)
1. [Simple Advection Example in 1d](docs/examples/simple_advection_example_1d.ipynb)
2. ...

The documentation is still in progress. For now, the best way to get started is
Expand Down
55 changes: 55 additions & 0 deletions docs/api/etdrk_backbone.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# ETDRK Backbone

Core clases that implement the Exponential Time Differencing Runge-Kutta (ETDRK)
method for solving semi-linear PDEs in form of timesteppers. Require supplying
the time step size $\Delta t$, the linear operator in Fourier space $\hat{\mathcal{L}}_h$, and the non-linear operator in Fourier space $\hat{\mathcal{N}}_h$.

::: exponax.etdrk.ETDRK0
options:
members:
- __init__
- step_fourier

---

::: exponax.etdrk.ETDRK1
options:
members:
- __init__
- step_fourier

---

::: exponax.etdrk.ETDRK2
options:
members:
- __init__
- step_fourier

---

::: exponax.etdrk.ETDRK3
options:
members:
- __init__
- step_fourier

---

::: exponax.etdrk.ETDRK4
options:
members:
- __init__
- step_fourier

---

::: exponax.etdrk.BaseETDRK
options:
members:
- __init__
- step_fourier

---

::: exponax.etdrk.roots_of_unity
7 changes: 7 additions & 0 deletions docs/api/stepper/difficulty/convection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Convection

::: exponax.normalized.DifficultyConvectionStepper
options:
members:
- __init__
- __call__
7 changes: 7 additions & 0 deletions docs/api/stepper/difficulty/gradient_norm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Gradient Norm

::: exponax.normalized.DifficultyGradientNormStepper
options:
members:
- __init__
- __call__
7 changes: 7 additions & 0 deletions docs/api/stepper/difficulty/linear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Linear

::: exponax.normalized.DifficultyLinearStepper
options:
members:
- __init__
- __call__
7 changes: 7 additions & 0 deletions docs/api/stepper/difficulty/nonlinear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Nonlinear

::: exponax.normalized.DifficultyGeneralNonlinearStepper
options:
members:
- __init__
- __call__
7 changes: 7 additions & 0 deletions docs/api/stepper/difficulty/polynomial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Polynomial

::: exponax.normalized.DifficultyPolynomialStepper
options:
members:
- __init__
- __call__
7 changes: 7 additions & 0 deletions docs/api/stepper/normalized/convection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Convection

::: exponax.normalized.NormalizedConvectionStepper
options:
members:
- __init__
- __call__
7 changes: 7 additions & 0 deletions docs/api/stepper/normalized/gradient_norm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Gradient NormA

::: exponax.normalized.NormalizedGradientNormStepper
options:
members:
- __init__
- __call__
7 changes: 7 additions & 0 deletions docs/api/stepper/normalized/nonlinear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Nonlinear

::: exponax.normalized.NormalizedGeneralNonlinearStepper
options:
members:
- __init__
- __call__
7 changes: 7 additions & 0 deletions docs/api/stepper/normalized/polynomial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Polynomial

::: exponax.normalized.NormalizedPolynomialStepper
options:
members:
- __init__
- __call__
7 changes: 7 additions & 0 deletions docs/api/stepper/normalized/vorticity_convection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Vorticity Convection

::: exponax.normalized.NormalizedVorticityConvection
options:
members:
- __init__
- __call__
17 changes: 17 additions & 0 deletions docs/api/stepper/physical/burgers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Burgers

In 1D:

$$ \frac{\partial u}{\partial t} + \frac{1}{2} \frac{\partial u^2}{\partial x} = \nu \frac{\partial^2 u}{\partial x^2} $$

In higher dimensions:

$$ \frac{\partial u}{\partial t} + \frac{1}{2} \nabla \cdot (u \odot u) = \nu \nabla \cdot \nabla u $$

(with as many channels (=velocity components) as spatial dimensions)

::: exponax.stepper.Burgers
options:
members:
- __init__
- __call__
7 changes: 7 additions & 0 deletions docs/api/stepper/physical/general/general_convection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# General Convection Stepper

::: exponax.stepper.GeneralConvectionStepper
options:
members:
- __init__
- __call__
7 changes: 7 additions & 0 deletions docs/api/stepper/physical/general/general_gradient_norm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# General Gradient Norm Stepper

::: exponax.stepper.GeneralGradientNormStepper
options:
members:
- __init__
- __call__
7 changes: 7 additions & 0 deletions docs/api/stepper/physical/general/general_linear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# General Linear Stepper

::: exponax.stepper.GeneralLinearStepper
options:
members:
- __init__
- __call__
7 changes: 7 additions & 0 deletions docs/api/stepper/physical/general/general_nonlinear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# General Nonlinear Stepper

::: exponax.stepper.GeneralNonlinearStepper
options:
members:
- __init__
- __call__
7 changes: 7 additions & 0 deletions docs/api/stepper/physical/general/general_polynomial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# General Polynomial Stepper

::: exponax.stepper.GeneralPolynomialStepper
options:
members:
- __init__
- __call__
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# General Vorticity Convection Stepper

::: exponax.stepper.GeneralVorticityConvectionStepper
options:
members:
- __init__
- __call__
7 changes: 7 additions & 0 deletions docs/api/stepper/physical/kdv.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Korteweg-de Vries

::: exponax.stepper.KortewegDeVries
options:
members:
- __init__
- __call__
17 changes: 17 additions & 0 deletions docs/api/stepper/physical/ks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Kuramoto-Sivashinsky equation

In 1D:

$$ \frac{\partial u}{\partial t} + \frac{1}{2} \left(\frac{\partial u}{\partial x}\right)^2 + \frac{\partial^2 u}{\partial x^2} + \frac{\partial^4 u}{\partial x^4} = 0 $$

In higher dimensions:

$$ \frac{\partial u}{\partial t} + \frac{1}{2} \left \| \nabla u \right \|^2 + \nabla \cdot \nabla u + \nabla \cdot (\nabla \odot \nabla \odot \nabla) u = 0 $$

Uses the combustion format via the gradient norm that easily scales to higher dimensions.

::: exponax.stepper.KuramotoSivashinsky
options:
members:
- __init__
- __call__
11 changes: 11 additions & 0 deletions docs/api/stepper/physical/ks_cons.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Kuramoto-Sivashinsky (conservative format)

Uses the convection nonlinearity similar to Burgers, but only works in 1D:

$$ \frac{\partial u}{\partial t} + \frac{1}{2} \frac{\partial u^2}{\partial x} + \frac{\partial^2 u}{\partial x^2} + \frac{\partial^4 u}{\partial x^4} = 0 $$

::: exponax.stepper.KuramotoSivashinskyConservative
options:
members:
- __init__
- __call__
7 changes: 7 additions & 0 deletions docs/api/stepper/physical/linear/advection.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# Advection

In 1D:

$$ \frac{\partial u}{\partial t} + c \frac{\partial u}{\partial x} = 0 $$

In higher dimensions:

$$ \frac{\partial u}{\partial t} + \vec{c} \cdot \nabla u = 0 $$

(often just $\vec{c} = c \vec{1}$)


::: exponax.stepper.Advection
Expand Down
17 changes: 17 additions & 0 deletions docs/api/stepper/physical/linear/advection_diffusion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Advection-Diffusion

In 1D:

$$ \frac{\partial u}{\partial t} + c \frac{\partial u}{\partial x} = \nu \frac{\partial^2 u}{\partial x^2} $$

In higher dimensions:

$$ \frac{\partial u}{\partial t} + \vec{c} \cdot \nabla u = \nu \nabla \cdot \nabla u $$

(often just $\vec{c} = c \vec{1}$) and potentially with anisotropic diffusion.

::: exponax.stepper.AdvectionDiffusion
options:
members:
- __init__
- __call__
21 changes: 21 additions & 0 deletions docs/api/stepper/physical/linear/diffusion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Diffusion

In 1D:

$$ \frac{\partial u}{\partial t} = \nu \frac{\partial^2 u}{\partial x^2} $$

In higher dimensions:

$$ \frac{\partial u}{\partial t} = \nu \nabla \cdot \nabla u $$

or with anisotropic diffusion:

$$ \frac{\partial u}{\partial t} = \nabla \cdot \left( A \nabla u \right) $$

with $A \in \R^{D \times D}$ symmetric positive definite.

::: exponax.stepper.Diffusion
options:
members:
- __init__
- __call__
19 changes: 19 additions & 0 deletions docs/api/stepper/physical/linear/dispersion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Dispersion

In 1D:

$$ \frac{\partial u}{\partial t} = \xi \frac{\partial^3 u}{\partial x^3} $$

In higher dimensions:

$$ \frac{\partial u}{\partial t} = \xi \nabla \cdot (\nabla \odot \nabla) u $$

or with spatial mixing:

$$ \frac{\partial u}{\partial t} = \xi (1 \cdot \nabla) (\nabla \cdot \nabla) u $$

::: exponax.stepper.Dispersion
options:
members:
- __init__
- __call__
19 changes: 19 additions & 0 deletions docs/api/stepper/physical/linear/hyper_diffusion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Hyper-Diffusion

In 1D:

$$ \frac{\partial u}{\partial t} = \xi \frac{\partial^4 u}{\partial x^4} $$

In higher dimensions:

$$ \frac{\partial u}{\partial t} = \zeta \nabla \cdot (\nabla \odot \nabla \odot \nabla) u $$

or with spatial mixing:

$$ \frac{\partial u}{\partial t} = \zeta (\nabla \cdot \nabla)(\nabla \cdot \nabla) u $$

::: exponax.stepper.HyperDiffusion
options:
members:
- __init__
- __call__
Loading
Loading