NDF-Poli-USP/spyro ? reverse-engineered prompt
Reverse engineered prompt
Build me a Python library for modeling acoustic waves in seismic settings, with forward and adjoint time domain wave propagation and support for full waveform inversion workflows. I want it to work with Firedrake and handle 2D and 3D simplex meshes, with a stable explicit time stepping scheme, absorbing boundaries with a perfectly matched layer, and sparse source and receiver injection and interpolation. Please include a clean way to run forward simulations, adjoint runs, and gradient calculations for inversion, plus a small demo or tutorial that shows a basic forward example and an FWI style workflow.
If there are any current Firedrake setup details or mesh generation options that need checking, look up the latest docs online and follow the project style already in the repo. Make it usable from Python, with tests, examples, and enough documentation so someone with basic seismology knowledge can try it out without having to understand all the implementation details first.
Are you gonna build this?
make sure you review the code using coderabbit