sweep-solver
The differentiable wave-equation engine. Nine equation families — acoustic, elastic, VTI, TTI, VRZ, SEM — on torch / JAX / native-CUDA backends, with FWI, LSRTM and RTM building blocks.
Open the solver docssweepx.agent
The natural-language control layer. Say what you want and a
local LLM (Ollama / vLLM) turns it into a validated sweep
run — forward modelling, benchmark models, plots.
…and the toolkit
sweepx.tasks (production FWI/LSRTM runner),
sweepx.loss, sweepx.io, sweepx.nn and
sweepx.opt, all in the one sweepx package; tomography follows.
Recently shipped.
The latest user-visible additions across the stack. The badge says where each one lives: a released version you get from pip install, or dev for what is merged but not yet on PyPI — these docs are built from the development branch.
sweep.sem.PropSEM solves on meshes fitted to the free surface, with PropTorch's constructor and call: acoustic, elastic, fluid-solid and Biot poroelastic in 2-D, acoustic and elastic in 3-D, with C-PML, boundary saving and impl='c' kernels. sweep list equations lists them next to the finite-difference equations.Biot: 2-D low-frequency Biot waves, fast P, slow P and S in one wavefield, with gradients. The viscous drag is integrated exactly, so any permeability runs at the fast-P time step, and biot_from_rock builds the coefficients from rock properties.ElasticCurvilinear now follows Bartana, Xu & Rickett: collocated fields and a self-adjoint operator that stays stable on every hill tried, where the old scheme blew up. Sources, receivers, snapshots and models all live on the physical grid. It replaces the APM free surface, now removed.AcousticVTI and AcousticTTI of Liang et al. (2023) run on impl='c' with full-storage and boundary-saving gradients, and gain Born / LSRTM forms, AcousticVTIBorn and AcousticTTIBorn, on both backends.ElasticBorn models Born data for the 2-D first-order elastic equation (Li et al., 2019): the scattered field is the exact derivative of the Elastic step, on eager and impl='c', with gradients for the vp, vs and rho perturbations and, on eager, the elastic RWI background gradient. The LSRTM equations are now named Born: AcousticBorn, AcousticBorn3D, AcousticVTIBorn, AcousticTTIBorn.sweep-tasks run. No source wavelet, and under an hour on one V100.One install.
Then import sweep.¶
sweepx is the toolkit — the task runner, the agent and the libraries they use — and it pulls in the engine, sweep-solver, as a dependency. Install sweepx; import the engine as sweep (same pattern as scikit-learn → sklearn) and the toolkit as sweepx.<module>.
# one install — the engine and the whole toolkit:
# pip install sweepx
import sweep # ← sweep-solver, the engine
from sweep.propagator.torch import PropTorch # torch / JAX / native-CUDA
from sweep.equations import Acoustic, ElasticTTI # nine equation families
from sweepx.loss import EnvelopeLoss # ← sweepx, the toolkit
from sweepx.tasks import load_task, TaskRunner # YAML task runner
# …or drive it all in plain language — sweepx.agent:
# sweep-agent chat
# >>> load Marmousi and run a forward — show the shot gather
The engine, and the toolkit on top.
The engine is its own package, sweep-solver, so it installs on its own. Everything built on it ships together in sweepx, one module per job, layered agent → tasks → io / loss / nn / opt: a module imports only from the layers below it.