SEMSWS (Spectral Element Method — Seismic Wave Simulator) simulates seismic waves from the exploration scale to the whole Earth, and computes the gradients for full-waveform inversion. It is written in C++17 on MFEM, runs in parallel with MPI, and runs on GPUs (CUDA, HIP) from the same source.
Physics
- Acoustic, elastic, viscoelastic (constant Q, generalized Zener) and coupled fluid–solid wave propagation, in 2D and 3D
- Anisotropic elastic media: C_ij, Thomsen and azimuthal parameterisations
Scales
- Exploration scale, regional and global simulations; regional and global
runs on cubed-sphere meshes built by
sphere_mesh
Inversion
- Adjoint sensitivity kernels for velocities, density, attenuation (1/Q) and anisotropic parameters, with optimal (Revolve) checkpointing
- Gauss–Newton Hessian-vector products (Born)
Running
- MPI on CPUs and GPUs, in single or double precision
- Spack recipes for CPU and GPU builds
- A Python driver (
driver/) runs many shots of one survey
cmake -B build -DCMAKE_BUILD_TYPE=Release -DMFEM_DIR=<mfem-build-or-install>
cmake --build build -j
mpirun -np 4 build/src/semsws --config config.yamlEverything a run does is set in one YAML file. The manual covers installation (with Spack or CMake), every configuration key, the tools and the examples:
manual/semsws_manual_EN.pdf— Englishmanual/semsws_manual_JA.pdf— 日本語
Changes since the paper's version are in CHANGELOG.md.
The paper submitted to Seismica (Mukumoto et al.) describes v0.1.0, archived on Zenodo: doi:10.5281/zenodo.21124594.
SEMSWS depends on the following projects; each has its own license:
- MFEM — finite element library (BSD-3)
- hypre — preconditioners and solvers (Apache 2.0 / MIT)
- METIS — mesh partitioning (Apache 2.0)
- HDF5 — data format (BSD-3)
- ADIOS2 — parallel I/O (Apache 2.0)
- yaml-cpp — YAML parser (MIT)
- NetCDF — Cubit / Exodus mesh input (BSD-3), optional
- FFTW — FFTs (GPL-2.0-or-later), optional
- pocketfft — FFTs when FFTW is not used (BSD-3), bundled in
third_party/ - CRUST1.0 — crustal model, not shipped (
scripts/fetch_crust1.sh)
SEMSWS is built on MFEM; we thank the MFEM developers for the library and their support. Much of the refactoring and many of the improvements since v0.1.0 were made with the help of Claude (Anthropic).
SEMSWS is released under the GNU General Public License, version 3 or later. Releases up to 2026-07-15 remain available under the BSD 3-Clause License.

