AcousticVRZ¶
sweep.equations.AcousticVRZ ¶
Bases: sweep.equations.base.SecondOrderEquation
Second-order 2-D acoustic wave equation in variable-density VRZ form.
Pressure-only scalar acoustics with explicit density coupling through
an impedance-like auxiliary parameter z. The Laplacian carries an
extra term ∇b · ∇p (with b = vp / z, κ = z · vp), so the
propagator is a single second-order PDE in h1 that correctly
refracts at sharp impedance contrasts without needing a staggered
velocity field. Absorbing boundaries via split-step CPML (cpmlr).
Reference: 10.3997/2214-4609.202010332.
Models (constructor input order)
vp(m/s): Acoustic velocity model.z: Auxiliary parameter used by the VRZ formulation.
Wavefields
h1(aliases:pressure,p): Primary VRZ acoustic pressure-like wavefield; default source and receiver.h2(aliases:pressure_prev): Previous-step VRZ acoustic pressure-like wavefield (internal).psix: CPML memory variable for the x-derivative term (internal).psiz: CPML memory variable for the z-derivative term (internal).zetax: CPML auxiliary wavefield for the x-direction update (internal).zetaz: CPML auxiliary wavefield for the z-direction update (internal).
Defaults
source_type:['h1']receiver_type:['h1']pml_type:'cpmlr'
Build the 2-D VRZ acoustic equation operator.
Parameters:
-
spatial_order–FD accuracy order of the spatial Laplacian and the auxiliary first-derivative kernels used by the
∇b · ∇pterm — e.g.spatial_order=4is fourth-order accurate. Internally the half-stencil width isM = spatial_order // 2(used for loop bounds and PML padding). Must be an even integer (2, 4, 6, 8, 10, …). Performance note (impl='c'on CUDA): the compiled kernels ship template specialisations only forspatial_order ∈ {2, 4, 6, 8}. Above 8 the dispatcher drops to a generic runtime path (order = -1insrc/sweep/csrc/cuda/equations/acoustic_vrz2d/forward.cu) which uses more registers and runs noticeably slower. The PyTorch eager path is unaffected. Defaults to 4. -
device–Device for the operator's static gradient kernels. Use
'cuda'/ atorch.devicefor GPU runs so the propagator can follow without a host↔device copy. Defaults to'cpu'. -
backend–Array / programming backend,
'torch'or'jax'. When you later wantimpl='c', leave this on'torch'— the compiled CUDA kernels go through the Torch binding. Defaults to'torch'. -
dim–Stored dimensionality. Always
2for this class; use :class:AcousticVRZ3Dfor 3-D. Defaults to 2.