SMIwiz is a C/MPI toolbox for acoustic seismic modelling, imaging, and inversion. It uses high-order staggered-grid finite-difference time-domain propagation and includes workflows for forward modelling, RTM, LSRTM, FWI, source estimation, migration deconvolution, and wavefield decomposition.
The repository contains the core solver, a small GTK launcher, reproducible synthetic examples, and reference materials for the published methods.
SMIwiz currently supports:
- 2D and 3D acoustic modelling on staggered grids
- Isotropic, VTI, and TTI model input paths
- Forward modelling and data generation
- Full waveform inversion (FWI), adaptive waveform inversion (AWI), and gradient evaluation
- Reverse time migration (RTM)
- Data-domain least-squares RTM (LSRTM)
- Source inversion
- Angle-domain common-image-gather (ADCIG) extraction
- Point-spread-function (PSF) Hessian calculation
- Migration deconvolution with PSF-based PCGNR or FFT-Wiener filtering
- Up-going and down-going wavefield separation
If you use this code in research, cite the relevant paper(s):
- Pengliang Yang, “SMIwiz: An integrated toolbox for multidimensional seismic modelling and imaging”, Computer Physics Communications 295, 109011, 2024. DOI: 10.1016/j.cpc.2023.109011
- Zhengyu Ji and Pengliang Yang, “SMIwiz-2.0: Extended functionalities for wavefield decomposition, linearized and nonlinear inversion”, Computer Physics Communications 309, 109503, 2025. DOI: 10.1016/j.cpc.2025.109503
- Pengliang Yang and Zhengyu Ji, “A comparative study of data- and image-domain LSRTM under velocity-impedance parametrization”, Computers & Geosciences 208, 106091, 2026. DOI: 10.1016/j.cageo.2025.106091
Project talk: https://cassyni.com/events/P4W1QfiGXffuSf6Rv5VzJZ
src/: core C implementation andMakefileinclude/: public headers and shared data structuresbin/: output directory for compiled executablesdoc/: papers and supporting technical referencesGUI/: GTK3 launcher for editinginputpar.txtand running jobsrun_fwd/: minimal forward-modelling examplerun_fwi2d/: small 2D FWI example in a layered modelrun_marmousi/: 2D Marmousi FWI examplerun_rtm/: 2D RTM examplerun_lsrtm2d/: 2D two-parameter LSRTM examplerun_lsrtm3d/: 3D two-parameter LSRTM examplerun_decon_1par/: one-parameter migration deconvolution workflowsrun_updown/: up/down wavefield separation examplerun_fbrec3d/: 3D wavefield reconstruction examplerun_fwi3d/: 3D FWI example assets and survey generationrun_fwd_aniso/: anisotropic forward-modelling examplerun_Viking/,run_Viking_85shots/: Viking Graben real-data workflowsrun_rwi_grad/: gradient-generation and related inversion experiments
- Linux
- MPI compiler and runtime, typically OpenMPI or MPICH
- FFTW3 development libraries
make- Optional:
gfortranfor helper programs in some example directories - Optional: GTK3 development packages for the GUI
The main build uses mpicc and expects the FFTW installation prefix through the fftw3 environment variable.
export fftw3=/path/to/fftw3
cd src
makeThis creates the solver at bin/SMIwiz.
If your MPI wrapper or FFTW location differs, adjust src/Makefile.
SMIwiz is launched with MPI and a flat parameter list, usually generated from an inputpar.txt file:
mpirun -n <ranks> ../bin/SMIwiz $(cat inputpar.txt)Most example directories already contain a run.sh or similarly named script that writes inputpar.txt and starts a job.
The executable entry point in src/main.c dispatches work by mode=:
0: forward modelling1: time-domain FWI2: RTM3: data-domain LSRTM4: FWI gradient building5: source inversion6: ADCIG extraction7: PSF Hessian computation8: iterative migration deconvolution via PSF9: migration deconvolution via FFT-Wiener filtering10: up/down wavefield separation
Most runs need at least:
- grid and time parameters:
n1,n2, optionaln3,d1,d2, optionald3,nt,dt - acquisition description:
acquifile=... - model files:
vpfile=...,rhofile=... - source wavelet:
stffile=...unlessmode=5 - inversion or imaging options depending on the selected mode
Model files are read as binary float arrays with dimensions matching the declared grid size.
For mode=1 or mode=4, the inversion objective is selected with objopt=:
objopt=0: conventional L2 FWI objective, using the weighted residualdobs - dcalobjopt=1: reverse AWI objective following Warner and Guasch (2016), using trace-by-trace Wiener filters that map observed traces to predicted traces
The AWI implementation is in [src/awi_adjoint_source.c]. It uses the normalized lag-weighted objective, honors the data weights/mutes in wdat, and generates the corresponding adjoint source for the existing dobs - dcal back-propagation convention.
export fftw3=/path/to/fftw3
cd src
makecd ../run_fwi2d
bash run.shThat script writes inputpar.txt and launches:
mpirun -n 2 ../bin/SMIwiz $(cat inputpar.txt)cd ../run_rtm
bash run_rtm.shThe RTM example is configured for a larger MPI job in the provided script, so adjust the mpirun -n value if your machine has fewer ranks available.
run_fwi2d/is the easiest place to start. It is small, self-contained, and shows the standardinputpar.txtworkflow clearly.run_marmousi/andrun_fwd_aniso/are useful for more realistic 2D tests and anisotropic inputs.run_decon_1par/expects a staged workflow: first compute the PSF (mode=7), then run deconvolution withmode=8ormode=9depending on method.run_fbrec3d/requires generatingacqui.txtlocally before running because the full file is too large to keep in the repository.run_Viking/is the real-data workflow. Followrun_Viking/0_readme.txtfor its step-by-step process.
The GTK launcher in GUI/ provides a simple interface for editing inputpar.txt, selecting the run directory, and launching mpirun.
Build and run it with:
cd GUI
make
./guiSee GUI/README.md for the current GUI behavior and requirements.
Pengliang Yang
Email: ypl.2100@gmail.com
This project is distributed under the GPL-3.0 license. See LICENSE.