Skip to content

Commit b283f9f

Browse files
committed
docs: publish via sweepx; drop the duplicated theme
The site is now the Solver section of sweepx, which owns the theme — so the second copy of it here (overrides/, extra.css, the hero landing page) is gone and Pages only redirects.
1 parent 810afca commit b283f9f

13 files changed

Lines changed: 147 additions & 3096 deletions

File tree

.github/workflows/pages.yml

Lines changed: 64 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1-
name: Deploy docs to Pages
1+
name: Redirect docs to the sweepx site
2+
3+
# This repo's docs are published as the Solver section of the sweepx umbrella
4+
# site, which owns the theme and builds every package's docs together. What
5+
# GitHub Pages serves from here is now only a redirect, so the old URLs — README
6+
# badges, paper links, bookmarks — keep working:
7+
#
8+
# /sweep/ → <TARGET>/
9+
# /sweep/api/equations/… → <TARGET>/api/equations/… (via 404.html)
10+
#
11+
# The path layout matches one-to-one, because the umbrella imports this docs/
12+
# flat. Deep links are mapped by 404.html: Pages serves it for any unknown path,
13+
# and its script re-attaches the tail to the target.
14+
#
15+
# TARGET is the umbrella's Solver section.
216

317
on:
418
push:
@@ -14,45 +28,68 @@ concurrency:
1428
group: pages
1529
cancel-in-progress: true
1630

31+
env:
32+
TARGET: https://sweepx.deepwave.group/solver
33+
1734
jobs:
1835
build:
1936
runs-on: ubuntu-latest
2037
steps:
21-
- name: Checkout
22-
uses: actions/checkout@v4
23-
2438
- name: Setup Pages
2539
uses: actions/configure-pages@v5
2640

27-
- name: Setup Python
28-
uses: actions/setup-python@v5
29-
with:
30-
python-version: '3.11'
31-
cache: 'pip'
32-
cache-dependency-path: docs/requirements.txt
33-
34-
- name: Install dependencies
41+
- name: Generate the redirect site
3542
run: |
36-
pip install -r docs/requirements.txt
37-
# CPU-only torch wheel — sweep's optional torch backend is
38-
# imported at the top of several equation modules (das.py,
39-
# elasticP.py, visco_acoustic.py); without it, mkdocstrings
40-
# cannot resolve `sweep.equations.DAS` and the docs build
41-
# fails.
42-
pip install torch --index-url https://download.pytorch.org/whl/cpu
43-
# Install sweep itself (without the CUDA extension) so
44-
# mkdocstrings' force_inspection mode can import the
45-
# package — its docstring section comes from the runtime
46-
# `WaveEquation.__init_subclass__` admonition injection.
47-
pip install --no-build-isolation -e .
43+
mkdir -p _site
44+
45+
cat > _site/index.html <<HTML
46+
<!doctype html>
47+
<html lang="en">
48+
<head>
49+
<meta charset="utf-8">
50+
<title>sweep-solver documentation moved</title>
51+
<link rel="canonical" href="${TARGET}/">
52+
<meta name="robots" content="noindex">
53+
<meta http-equiv="refresh" content="0; url=${TARGET}/">
54+
<script>location.replace("${TARGET}/" + location.hash);</script>
55+
</head>
56+
<body style="font:16px/1.6 system-ui,sans-serif;max-width:34rem;margin:15vh auto;padding:0 1rem">
57+
<h1 style="font-size:1.35rem">The docs moved</h1>
58+
<p>sweep-solver's documentation is now the <strong>Solver</strong> section of the
59+
sweepx site.</p>
60+
<p><a href="${TARGET}/">${TARGET}/</a></p>
61+
</body>
62+
</html>
63+
HTML
4864
49-
- name: Build site
50-
run: mkdocs build
65+
# Pages serves 404.html for any path it doesn't have, which makes it a
66+
# catch-all: strip this project's base path, re-attach the rest.
67+
cat > _site/404.html <<HTML
68+
<!doctype html>
69+
<html lang="en">
70+
<head>
71+
<meta charset="utf-8">
72+
<title>Redirecting…</title>
73+
<meta name="robots" content="noindex">
74+
<script>
75+
(function () {
76+
var base = "/sweep/";
77+
var p = location.pathname;
78+
var rest = p.indexOf(base) === 0 ? p.slice(base.length) : "";
79+
location.replace("${TARGET}/" + rest + location.search + location.hash);
80+
})();
81+
</script>
82+
</head>
83+
<body style="font:16px/1.6 system-ui,sans-serif;max-width:34rem;margin:15vh auto;padding:0 1rem">
84+
<p>The docs moved to <a href="${TARGET}/">${TARGET}/</a>.</p>
85+
</body>
86+
</html>
87+
HTML
5188
5289
- name: Upload artifact
5390
uses: actions/upload-pages-artifact@v3
5491
with:
55-
path: site
92+
path: _site
5693

5794
deploy:
5895
environment:

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<h1 align="center">SWEEP</h1>
99

1010
<p align="center">
11-
<a href="https://deepwave-kaust.github.io/sweep/"><img alt="Docs" src="https://img.shields.io/badge/docs-online-blue?logo=readthedocs&logoColor=white"></a>
11+
<a href="https://sweepx.deepwave.group/solver/"><img alt="Docs" src="https://img.shields.io/badge/docs-online-blue?logo=readthedocs&logoColor=white"></a>
1212
<a href="https://opensource.org/licenses/MIT"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg"></a>
1313
<a href="https://pytorch.org"><img alt="PyTorch" src="https://img.shields.io/badge/PyTorch-2.0%2B-EE4C2C?logo=pytorch&logoColor=white"></a>
1414
</p>
@@ -17,7 +17,7 @@
1717

1818
**Seismic Wave Equation Exploration Platform** — a differentiable framework for seismic wave-equation modeling, migration, and full-waveform inversion. One API, 20+ equations (acoustic / elastic / VTI / TTI / DAS), PyTorch and JAX backends, eager and compiled CUDA paths.
1919

20-
📖 **Documentation**: <https://deepwave-kaust.github.io/sweep/>
20+
📖 **Documentation**: <https://sweepx.deepwave.group/solver/>
2121

2222
## Install
2323

@@ -51,7 +51,7 @@ V100, `"8.0"` A100, `"8.9"` RTX 6000 Ada) before the second command.
5151

5252
<sub>`sweepx` is the PyPI distribution name; you `import sweep` (the `scikit-learn``import sklearn`
5353
pattern, because the bare name `sweep` is taken on PyPI). `pip install sweep-solver` is equivalent.
54-
Full install notes are in [the docs](https://deepwave-kaust.github.io/sweep/getting-started/installation/).</sub>
54+
Full install notes are in [the docs](https://sweepx.deepwave.group/solver/getting-started/installation/).</sub>
5555

5656
## Hello SWEEP
5757

README.zh-CN.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<h1 align="center">SWEEP</h1>
99

1010
<p align="center">
11-
<a href="https://deepwave-kaust.github.io/sweep/"><img alt="Docs" src="https://img.shields.io/badge/docs-online-blue?logo=readthedocs&logoColor=white"></a>
11+
<a href="https://sweepx.deepwave.group/solver/"><img alt="Docs" src="https://img.shields.io/badge/docs-online-blue?logo=readthedocs&logoColor=white"></a>
1212
<a href="https://opensource.org/licenses/MIT"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg"></a>
1313
<a href="https://pytorch.org"><img alt="PyTorch" src="https://img.shields.io/badge/PyTorch-2.0%2B-EE4C2C?logo=pytorch&logoColor=white"></a>
1414
</p>
@@ -17,7 +17,7 @@
1717

1818
**Seismic Wave Equation Exploration Platform** —— 一个可微分的地震波方程正演、偏移与全波形反演框架。一套 API,20+ 种波动方程(声波 / 弹性 / VTI / TTI / DAS),支持 PyTorch 与 JAX 后端,eager 与编译 CUDA 两条实现路径。
1919

20-
📖 **文档**: <https://deepwave-kaust.github.io/sweep/>
20+
📖 **文档**: <https://sweepx.deepwave.group/solver/>
2121

2222
## 安装
2323

@@ -42,7 +42,7 @@ SWEEP_BUILD_CUDA=1 pip install -v ".[cuda]" --no-build-isolation
4242

4343
如果预编译无法自动检测 GPU 架构,在第二条命令前先设置 `TORCH_CUDA_ARCH_LIST`(如 V100 用 `"7.0"`、A100 用 `"8.0"`、RTX 6000 Ada 用 `"8.9"`)。
4444

45-
<sub>`sweepx` 是 PyPI 发行名,导入用 `import sweep`(类似 `scikit-learn``import sklearn`,因为裸名 `sweep` 在 PyPI 已被占)。`pip install sweep-solver` 等价。完整说明见[文档](https://deepwave-kaust.github.io/sweep/getting-started/installation/)。</sub>
45+
<sub>`sweepx` 是 PyPI 发行名,导入用 `import sweep`(类似 `scikit-learn``import sklearn`,因为裸名 `sweep` 在 PyPI 已被占)。`pip install sweep-solver` 等价。完整说明见[文档](https://sweepx.deepwave.group/solver/getting-started/installation/)。</sub>
4646

4747
## Hello SWEEP
4848

-17.1 KB
Binary file not shown.
-6.29 KB
Binary file not shown.

docs/figures/landing/hero_anim.gif

-30 KB
Binary file not shown.

docs/index.md

Lines changed: 35 additions & 165 deletions
Original file line numberDiff line numberDiff line change
@@ -1,166 +1,36 @@
1-
---
2-
template: home.html
3-
hide:
4-
- navigation
5-
- toc
6-
---
7-
8-
<section class="sweep-features-3">
9-
<a class="sweep-features-3__card" href="user-guide/propagators/">
10-
<div class="sweep-features-3__tag">DIFFERENTIABLE</div>
11-
<h3 class="sweep-features-3__title">Gradients all the way down.</h3>
12-
<p class="sweep-features-3__desc">
13-
Every <code>PropTorch</code> call is an autograd node. <code>loss.backward()</code> populates <code>vp.grad</code> as an ordinary torch Tensor — feed it to any optimizer.
14-
</p>
15-
<span class="sweep-features-3__link">Learn more <span aria-hidden="true">→</span></span>
16-
</a>
17-
<a class="sweep-features-3__card" href="notebooks/12_multi_gpu/">
18-
<div class="sweep-features-3__tag">HPC · MULTI-GPU</div>
19-
<h3 class="sweep-features-3__title">Scale across GPUs.</h3>
20-
<p class="sweep-features-3__desc">
21-
Wrap the inversion in <code>torchrun --nproc_per_node=4</code> and shots distribute themselves. Marmousi FWI hits <strong>3.79×</strong> on 4 × V100.
22-
</p>
23-
<span class="sweep-features-3__link">Learn more <span aria-hidden="true">→</span></span>
24-
</a>
25-
<a class="sweep-features-3__card" href="api/">
26-
<div class="sweep-features-3__tag">PHYSICS ZOO</div>
27-
<h3 class="sweep-features-3__title">Acoustic to TTI, 2D and 3D.</h3>
28-
<p class="sweep-features-3__desc">
29-
33 equation classes across nine families — Acoustic, Elastic, VTI, TTI, LSRTM-Born, DAS. PML and sponge boundaries. Same solver API for all of them.
30-
</p>
31-
<span class="sweep-features-3__link">Learn more <span aria-hidden="true">→</span></span>
32-
</a>
33-
</section>
34-
35-
<section class="sweep-onefile" markdown>
36-
<div class="sweep-onefile__inner" markdown>
37-
<div class="sweep-onefile__eyebrow">MINIFILM · HELLO · FWI</div>
38-
<h2 class="sweep-onefile__title">One file.<br><span class="sweep-onefile__dim">Forward → loss → backward.</span></h2>
39-
<p class="sweep-onefile__lede">A two-layer truth, one shot, sixty-four receivers — and a single <code>.backward()</code> hands you the velocity gradient.</p>
40-
41-
```python
42-
import numpy as np, torch
43-
from sweep.equations import Acoustic
44-
from sweep.propagator.torch import PropTorch
45-
from sweep.signal import ricker
46-
47-
dev = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
48-
solver = PropTorch(Acoustic(device=dev),
49-
shape=(96, 128), dh=10.0, dt=2e-3, dev=dev)
50-
51-
wavelet = ricker(np.arange(600) * 2e-3 - 0.12, f=10.0).astype(np.float32)
52-
sources = np.array([[64, 2]], dtype=np.int64)
53-
receivers = np.array([[[ix, 4] for ix in range(0, 128, 2)]], dtype=np.int64)
54-
55-
vp = torch.tensor(vp_init, device=dev, requires_grad=True)
56-
pred = solver(wavelet, sources, receivers, models=[vp])
57-
loss = 0.5 * (pred - obs).pow(2).sum()
58-
loss.backward() # vp.grad ready for any torch.optim step
59-
```
60-
61-
<a class="sweep-cta sweep-cta--ghost-dark" href="notebooks/00_hello_fwi/">Open the notebook →</a>
62-
</div>
63-
</section>
64-
65-
<section class="sweep-features-2">
66-
<div class="sweep-feature-card">
67-
<div class="sweep-feature-card__tag">EQUATIONS</div>
68-
<h3 class="sweep-feature-card__title">Acoustic. Elastic.<br>VTI. TTI.</h3>
69-
<p class="sweep-feature-card__desc">
70-
Nine equation classes, one solver API. Swap <code>Acoustic</code> for <code>ElasticTTI</code> without touching your inversion loop.
71-
</p>
72-
<code class="sweep-feature-card__code">from sweep.equations import ElasticTTI</code>
73-
<div class="sweep-feature-card__fig">
74-
<img src="figures/landing/feature_equations.png" alt="Wavefield from elastic equation">
75-
</div>
76-
</div>
77-
<div class="sweep-feature-card">
78-
<div class="sweep-feature-card__tag">OPTIMIZER</div>
79-
<h3 class="sweep-feature-card__title">Adam, L-BFGS, or write<br>your own.</h3>
80-
<p class="sweep-feature-card__desc">
81-
Gradients are torch Tensors. <code>eps=1e-16</code> on Adam keeps tiny FWI gradients from getting masked.
82-
</p>
83-
<code class="sweep-feature-card__code">torch.optim.Adam([vp], lr=25.0, eps=1e-16)</code>
84-
<div class="sweep-feature-card__fig">
85-
<img src="figures/landing/feature_optimizer.png" alt="vp gradient image">
86-
</div>
87-
</div>
88-
</section>
89-
90-
<section class="sweep-nb">
91-
<div class="sweep-nb__hd">
92-
<div class="sweep-nb__eyebrow">EXAMPLES</div>
93-
<h2 class="sweep-nb__title">Pre-baked notebooks.</h2>
94-
<p class="sweep-nb__lede">Every cell already executed. Read in the browser, or download to run locally.</p>
95-
</div>
96-
97-
<div class="sweep-nb__grid">
98-
<a class="sweep-nb__featured" href="notebooks/01_fwi_acoustic_marmousi/">
99-
<div class="sweep-nb__featured-media">
100-
<img src="figures/gallery/01_fwi_acoustic_marmousi.png" alt="Marmousi FWI">
101-
</div>
102-
<div class="sweep-nb__featured-body">
103-
<span class="sweep-nb__chip teal">BENCHMARK · ACOUSTIC</span>
104-
<h4>Marmousi FWI</h4>
105-
<p>3.5 km × 17 km Marmousi at 25 m grid. 20 shots, 200 receivers, 4 s record. Adam (lr=25, eps=1e-16) on the compiled CUDA backend.</p>
106-
<div class="sweep-nb__stats">
107-
<div><span>RUNTIME</span><strong>6.8 s</strong></div>
108-
<div><span>ITERS</span><strong>30</strong></div>
109-
<div><span>LOSS</span><strong>17× drop</strong></div>
110-
</div>
111-
</div>
112-
</a>
113-
114-
<div class="sweep-nb__side">
115-
<a class="sweep-nb__small" href="notebooks/05_wavefield_vti/">
116-
<span class="sweep-nb__chip amber">VTI · FORWARD</span>
117-
<h4>Diamond qP wavefront</h4>
118-
<p>Duveneck Fig. 2: ε = 0.25, δ = 0 on a 193 × 193 grid. Three VTI parameterizations side-by-side.</p>
119-
<div class="sweep-nb__small-media">
120-
<img src="figures/gallery/05_wavefield_vti.png" alt="VTI wavefield">
121-
</div>
122-
</a>
123-
124-
<a class="sweep-nb__cta" href="examples/">
125-
<div class="sweep-nb__cta-num">21 notebooks · 9 equations</div>
126-
<div class="sweep-nb__cta-title">See every<br><span class="sweep-nb__cta-italic">example.</span></div>
127-
<div class="sweep-nb__cta-tags">
128-
<span>FWI</span><span>RTM</span><span>LSRTM</span><span>Elastic</span><span>VTI</span><span>TTI</span><span>DAS</span><span>3D</span><span>Multi-GPU</span>
129-
</div>
130-
<div class="sweep-nb__cta-arrow">Browse all examples →</div>
131-
</a>
132-
</div>
133-
</div>
134-
</section>
135-
136-
<section class="sweep-stack">
137-
<div class="sweep-stack__eyebrow">THE STACK</div>
138-
<h2 class="sweep-stack__title">Built on what you already trust.</h2>
139-
<p class="sweep-stack__lede">Lazy imports — only the backend you actually use is loaded.</p>
140-
<div class="sweep-stack__grid">
141-
<div class="sweep-stack__card">
142-
<div class="sweep-stack__head"><span class="sweep-stack__dot" style="background:#1AA690"></span><span class="sweep-stack__role">PRIMARY</span></div>
143-
<div class="sweep-stack__name">PyTorch</div>
144-
<div class="sweep-stack__version">≥ 2.1</div>
145-
<div class="sweep-stack__desc">Default training backend. CUDA + CPU + MPS.</div>
146-
</div>
147-
<div class="sweep-stack__card">
148-
<div class="sweep-stack__head"><span class="sweep-stack__dot sweep-stack__dot--tri" style="border-bottom-color:#BCC83C"></span><span class="sweep-stack__role">PRIMARY</span></div>
149-
<div class="sweep-stack__name">JAX</div>
150-
<div class="sweep-stack__version">≥ 0.4.20</div>
151-
<div class="sweep-stack__desc">Functional autograd, jit, vmap.</div>
152-
</div>
153-
<div class="sweep-stack__card">
154-
<div class="sweep-stack__head"><span class="sweep-stack__dot sweep-stack__dot--sq" style="background:#ED8B2E"></span><span class="sweep-stack__role">GPU</span></div>
155-
<div class="sweep-stack__name">CUDA</div>
156-
<div class="sweep-stack__version">11 / 12</div>
157-
<div class="sweep-stack__desc">NVIDIA V100, A100, L40S, RTX 6000 Ada.</div>
158-
</div>
159-
<div class="sweep-stack__card">
160-
<div class="sweep-stack__head"><span class="sweep-stack__dot" style="background:#1AA690"></span><span class="sweep-stack__role">ALWAYS-ON</span></div>
161-
<div class="sweep-stack__name">NumPy</div>
162-
<div class="sweep-stack__version">≥ 1.26</div>
163-
<div class="sweep-stack__desc">Numerical interop, IO.</div>
164-
</div>
1+
# sweep-solver
2+
3+
The differentiable, GPU **wave-equation engine** at the core of the sweep
4+
ecosystem — forward modelling, RTM, and FWI / LSRTM, with equations for
5+
acoustic, elastic, VTI/TTI, VRZ and spectral-element (SEM) physics, and
6+
torch / JAX / native-CUDA backends.
7+
8+
Installed with `pip install sweepx` (or `pip install sweep-solver`) → `import sweep`.
9+
10+
<div class="grid cards" markdown>
11+
12+
- :material-rocket-launch-outline: __[Getting started](getting-started/installation.md)__
13+
14+
---
15+
16+
Install, run your first forward model, take your first gradient.
17+
18+
- :material-book-open-variant-outline: __[User guide](user-guide/equations.md)__
19+
20+
---
21+
22+
Equations, propagators, backends, boundary-saving, memory options.
23+
24+
- :material-notebook-outline: __[Examples](examples/index.md)__
25+
26+
---
27+
28+
Runnable notebooks — modelling, wavefields, FWI, RTM.
29+
30+
- :material-api: __[API reference](api/index.md)__
31+
32+
---
33+
34+
Every equation, propagator, and operator, documented from source.
35+
16536
</div>
166-
</section>

docs/javascripts/katex.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)