steadfastasart/geoscience-skills/devito
Claude Code and agent skill by steadfastasart/geoscience-skills
- community
Checking that the SKILL.md file is still in the repository.
Symbolic PDE solver with automatic code generation for finite-difference computations. Use when the agent needs to: (1) Perform seismic wave propagation modeling, (2) Implement acoustic or elastic wave equations, (3) Run forward modeling for shot gathers, (4) Set up Full Waveform Inversion (FWI) workflows, (5) Implement Reverse Time Migration (RTM), (6) Create absorbing boundary conditions, (7) Generate optimized stencil code for CPUs/GPUs, (8) Solve custom PDEs with finite differences.
Install
npx vskill@latest install steadfastasart/geoscience-skills/devitoSKILL.md
Devito - Symbolic PDE Solver
Quick Reference
Key Classes
| Class | Purpose | |
|---|---|---|
Grid | Computational domain definition | |
Function | Spatial field on grid | |
TimeFunction | Time-dependent field | |
SparseTimeFunction | Point sources/receivers | |
Operator | Compiled computation kernel |
Essential Operations
Grid and Fields
Source and Receivers
Build and Run
Symbolic Derivatives
| Syntax | Description | |
|---|---|---|
p.dt, p.dt2 | First/second time derivative | |
p.dx, p.dy, p.dz | Spatial derivatives | |
p.laplace | Laplacian (auto-adapts to dims) | |
p.forward | p at t+dt (time stepping) | |
p.backward | p at t-dt (adjoint) |
Stability and Accuracy
CFL Condition: dt < dx / (v_max * sqrt(ndim))
| Dims | Max dt | |
|---|---|---|
| 2D | dx / (v_max * 1.414) | |
| 3D | dx / (v_max * 1.732) |
| Space Order | Stencil Points | Error | |
|---|---|---|---|
| 2 | 3 | O(h^2) | |
| 4 | 5 | O(h^4) | |
| 8 | 9 | O(h^8) |
Higher order = more accurate but slower. Use 4-8 for production.
When to Use vs Alternatives
| Scenario | Recommendation | |
|---|---|---|
| Seismic wave propagation (acoustic/elastic) | Devito - symbolic PDE, auto-optimized code | |
| Full Waveform Inversion (FWI) or RTM | Devito - adjoint support, GPU-ready | |
| Legacy seismic processing pipelines | Madagascar - established, large script library | |
| Simple 1D/2D wave demos | Custom NumPy - no dependencies, easier to debug | |
| General-purpose PDE solving (non-wave) | FEniCS - FEM-based, broader PDE support | |
| Production seismic imaging at scale | Devito - generates optimized C code, MPI support |
Choose Devito when: You need high-performance finite-difference wave propagation with symbolic equation specification. It auto-generates optimized C/OpenMP/GPU code from Python-level math, making it ideal for FWI, RTM, and research prototyping.
Avoid Devito when: You need finite-element methods (use FEniCS), or simple pedagogical examples where NumPy suffices.
Common Workflows
Acoustic wave forward modelling with sources and receivers
- [ ] Define
Gridwith shape and physical extent matching the velocity model - [ ] Create velocity
Functionand populate with model values - [ ] Create
TimeFunctionfor the wavefield (time_order=2, space_order=4+) - [ ] Verify CFL condition:
dt < dx / (v_max * sqrt(ndim)) - [ ] Build wave equation stencil:
Eq(p.forward, solve(p.dt2 - v**2 * p.laplace, p.forward)) - [ ] Create source (
RickerSource) and receivers, set coordinates - [ ] Add source injection and receiver interpolation terms
- [ ] Compile
Operatorwith stencil + source + receiver terms - [ ] Run operator:
op(time_M=nt-1, dt=dt) - [ ] Extract shot record from
rec.dataand plot
References
- [Operators and Stencils](references/operators.md) - Detailed operator construction
- [Performance Optimization](references/performance.md) - GPU execution and tuning
Scripts
- [scripts/acoustic_wave.py](scripts/acoustic_wave.py) - Basic acoustic wave modeling
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingdevito/SKILL.md
Popularity
- Repository stars
- 71
- Repository forks
- 8
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/steadfastasart/geoscience-skills/devito)