Other equations¶
Exported equation classes without a page of their own; see the
equation index for the families. Compiled impl='c' kernels exist
for ElasticVRR, AcousticVTI1st and AcousticVTI1st3D; every other class
on this page runs on the eager backend only.
Curvilinear-grid topography¶
AcousticCurvilinear and ElasticCurvilinear are eager-only: they have no
CUDA kernel, so impl='auto' runs them eager and an explicit impl='c' falls
back to eager with a UserWarning.
sweep.equations.AcousticCurvilinear ¶
Bases: sweep.equations.base.SecondOrderEquation
Curvilinear-grid Acoustic 2-D for irregular topography.
Same field / source / receiver layout as :class:Acoustic. The
propagator must build a :class:CurvilinearGrid from the user's
topography and attach its padded metric tensors to this
equation via set_curvilinear_metrics before the first step.
Models (constructor input order)
vp(m/s): Acoustic P-wave velocity model.
Wavefields
h1(aliases:pressure,p): Primary acoustic pressure-like wavefield; default source and receiver.h2(aliases:pressure_prev): Previous-step pressure-like wavefield (internal).psix: CPML memory variable for the ξ-derivative term (internal).psiz: CPML memory variable for the η-derivative term (internal).zetax: CPML auxiliary wavefield for the ξ-direction update (internal).zetaz: CPML auxiliary wavefield for the η-direction update (internal).
Defaults
source_type:['h1']receiver_type:['h1']pml_type:'cpmlr'
set_curvilinear_metrics ¶
Attach precomputed metric tensors (padded to runtime shape).
sweep.equations.ElasticCurvilinear ¶
Bases: sweep.equations.base.FirstOrderEquation
Curvilinear-grid Elastic 2-D for irregular topography.
Same field / source / receiver layout as :class:Elastic. Metrics
are attached by the Propagator's curvilinear path.
Models (constructor input order)
vp(m/s): Elastic P-wave velocity model.vs(m/s): Elastic S-wave velocity model.rho(kg/m^3): Density model.
Wavefields
vx(aliases:velocity_x): Particle velocity in the x direction; default receiver.vz(aliases:velocity_z): Particle velocity in the z direction; default receiver.sxx(aliases:stress_xx): Normal stress in the x direction; default source.szz(aliases:stress_zz): Normal stress in the z direction; default source.sxz(aliases:stress_xz,shear_xz): Shear stress component.m_vxx: CPML memory for dvx/dx (internal).m_vxz: CPML memory for dvx/dz (internal).m_vzx: CPML memory for dvz/dx (internal).m_vzz: CPML memory for dvz/dz (internal).m_txxx: CPML memory for dsxx/dx (internal).m_txxz: Reserved (internal).m_tzzx: Reserved (internal).m_tzzz: CPML memory for dszz/dz (internal).m_txzx: CPML memory for dsxz/dx (internal).m_txzz: CPML memory for dsxz/dz (internal).
Defaults
source_type:['sxx', 'szz']receiver_type:['vx', 'vz']pml_type:'cpmls'
set_curvilinear_metrics ¶
Attach metric tensors. The elastic equation only needs alpha
and beta; the combined metric_p* fields (acoustic-only)
are accepted and ignored for interface compatibility.
Vector reflectivity (VRR)¶
sweep.equations.AcousticVRR ¶
Bases: sweep.equations.base.SecondOrderEquation
Second-order 2-D acoustic wave equation in variable-density VRR form.
Pressure-only scalar acoustics with density coupling carried by two
auxiliary first-derivative parameters rx, rz (rather than the
impedance-like z of :class:AcousticVRZ). The propagator is a single
second-order PDE in h1,
∂²p/∂t² = vp²·∇²p + vp·(∇vp·∇p) − 2·vp²·(r·∇p) ,
so it refracts at sharp 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.rx: Auxiliary horizontal parameter used by the VRR formulation.rz: Auxiliary vertical parameter used by the VRR formulation.
Wavefields
h1(aliases:pressure,p): Primary VRR acoustic pressure-like wavefield; default source and receiver.h2(aliases:pressure_prev): Previous-step VRR 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 VRR acoustic equation operator.
Parameters:
-
spatial_order(int, default:4) –The order of the Taylor expansion (must be even) for the spatial Laplacian and the auxiliary first-derivative kernels used by the
∇vp·∇p/r·∇pterms. Defaults to 4. -
device–Device for the operator's static gradient kernels. Use
'cuda'/ atorch.devicefor GPU runs. Defaults to'cpu'. -
backend–Array / programming backend,
'torch'or'jax'. Defaults to'torch'. -
dim–Stored dimensionality. Always
2for this class. Defaults to 2.
sweep.equations.ElasticVRR ¶
Bases: sweep.equations.base.FirstOrderEquation
First-order 2-D elastic vector-reflectivity wave equation.
Soares & Sacchi 2025 momentum-stress formulation. State variables
are (px, pz, sxx, szz, sxz) with p_i = rho * v_i particle
momentum; physical Cartesian stress is unchanged. Models are
(vp, vs, Rp_x, Rp_z, Rs_x, Rs_z) -- NO density.
Reference: Soares, A. S. Q. and Sacchi, M. D. (2025). Vector-reflectivity Elastic Wave Equation with First-order formulation, SEG Technical Program Expanded Abstracts, doi 10.1190/image2025-4316471.1.
Models (constructor input order)
vp(m/s): Elastic P-wave velocity model.vs(m/s): Elastic S-wave velocity model.Rp_x: P-impedance vector reflectivity, x component.Rp_z: P-impedance vector reflectivity, z component.Rs_x: S-impedance vector reflectivity, x component.Rs_z: S-impedance vector reflectivity, z component.
Wavefields
px(aliases:momentum_x): Particle momentum x-component (= rho*vx); default receiver.pz(aliases:momentum_z): Particle momentum z-component (= rho*vz); default receiver.sxx(aliases:stress_xx): Normal stress in x; default source.szz(aliases:stress_zz): Normal stress in z; default source.sxz(aliases:stress_xz,shear_xz): Shear stress component.m_pxx: CPML memory variable for dpx/dx (internal).m_pxz: CPML memory variable for dpx/dz (internal).m_pzx: CPML memory variable for dpz/dx (internal).m_pzz: CPML memory variable for dpz/dz (internal).m_sxxx: CPML memory variable for dsxx/dx (internal).m_sxxz: Reserved auxiliary field (layout parity with Elastic) (internal).m_szzx: Reserved auxiliary field (layout parity with Elastic) (internal).m_szzz: CPML memory variable for dszz/dz (internal).m_sxzx: CPML memory variable for dsxz/dx (internal).m_sxzz: CPML memory variable for dsxz/dz (internal).
Defaults
source_type:['sxx', 'szz']receiver_type:['px', 'pz']pml_type:'cpmls'
Build the elastic vector-reflectivity operator.
Parameters:
-
spatial_order–FD accuracy order of the staggered first-derivative operator. Must be even (2, 4, 6, 8, ...). Defaults to 4.
-
device–Device for the operator. Defaults to 'cpu'.
-
backend–'torch' or 'jax'. Defaults to 'torch'.
C_NAME
class-attribute
¶
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
supports_image_topography_c
class-attribute
¶
bool(x) -> bool
Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.
prepare_models ¶
Precompute the spatial gradients of vp and vs once per
run. These appear in every per-step gamma computation; doing them
once at setup saves 4 FD passes per timestep at the cost of 4
modelfield-sized tensors.
Anisotropic acoustic family¶
AcousticAniso is a factory: it returns an instance of one of the classes
below. The author-named aliases (AcousticVTILiang, AcousticTTILiang,
AcousticVTIAlkhalifah, AcousticTTIAlkhalifah, AcousticVTIDuveneck,
AcousticVTIDuveneck3D) and the AcousticVTIDefault / AcousticVTIDefault3D
routing names are these same classes.
sweep.equations.AcousticAniso ¶
Factory class — instantiating returns an equation instance.
Construction is intentionally lightweight: __new__ resolves the
target equation class and constructs it with the user-supplied
keyword arguments, returning that instance directly. isinstance(x,
AcousticAniso) will therefore be False — x is the actual
equation class (e.g. AcousticVTI1st).
Parameters¶
method : {"duveneck", "liang", "alkhalifah"}, default "duveneck" symmetry : {"vti", "tti"}, default "vti" ndim : {2, 3}, default 2 spatial_order : int, default 4 device : str, default "cpu" backend : str, default "torch" **equation_kwargs : forwarded to the resolved equation constructor.
Examples¶
from sweep.equations import AcousticAniso from sweep.propagator.torch import PropTorch eq = AcousticAniso(method="duveneck", symmetry="vti", ndim=2) isinstance(eq, AcousticAniso) False type(eq).name 'AcousticVTI1st'
sweep.equations.AcousticVTI ¶
Bases: sweep.equations.base.SecondOrderEquation
Second-order 2-D pseudo-acoustic VTI wave equation (Liang 2022).
Single-field pseudo-acoustic VTI formulation derived from the
dispersion relation. The pressure-like field h1 is driven by
PML-corrected Laplacian terms with anisotropy-dependent weights
that depend on the local propagation direction of the wavefront
(computed from the spatial gradients of h1 itself). This
avoids the auxiliary f field needed by the Alkhalifah / eta
family while still suppressing the shear-mode artifact that
plagues the original Alkhalifah pseudo-acoustic.
Source / receiver caveat: source_type=['h1'] is the default;
typical Ricker injection on h1 works well at modest grid
spacings. With strongly anisotropic media (large epsilon) at
dh=(5, 5) and dt=1 ms, the scheme can go unstable — use
coarser z spacing or smaller dt. Also exposed as
:class:AcousticAniso(method='liang', symmetry='vti').
Reference: Liang K. et al. 2022, 10.1190/geo2022-0292.1; underlying pseudo-acoustic derivation: 10.1190/geo2014-0242.1.
Models (constructor input order)
vp(m/s): VTI acoustic reference velocity.epsilon: Thomsen epsilon parameter.delta: Thomsen delta parameter.
Wavefields
h1(aliases:pressure,p): Primary acoustic-VTI pressure-like wavefield; default source and receiver.h2(aliases:pressure_prev): Previous-step 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 pseudo-acoustic VTI equation operator.
Parameters:
-
spatial_order–FD accuracy order of the spatial Laplacian and the auxiliary first-derivative kernels used by the anisotropy direction term — 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, …). This equation has no compiledimpl='c'path; useimpl='eager'(the default). Defaults to 4. -
device–Device for the operator's static kernels. Use
'cuda'/ atorch.devicefor GPU eager runs. Defaults to'cpu'. -
backend–Array / programming backend,
'torch'or'jax'. Defaults to'torch'. -
dim–Stored dimensionality. Always
2for this class. Defaults to 2.
supports_free_surface
class-attribute
¶
bool(x) -> bool
Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.
sweep.equations.AcousticTTI ¶
Bases: sweep.equations.base.SecondOrderEquation
Second-order 2-D pseudo-acoustic TTI wave equation (Liang 2022).
Tilted-symmetry-axis extension of :class:AcousticVTI. The
pressure-like field h1 is updated with anisotropy weights that
are computed in a tilted frame defined by theta; the Laplacian
along the symmetry axis is rotated accordingly, and an extra
∂²p/∂x∂z mixed-term carries the off-diagonal anisotropy.
Single-field pseudo-acoustic — no auxiliary f field. Also
exposed as :class:AcousticAniso(method='liang', symmetry='tti').
Reference: Liang K. et al. 2022, 10.1190/geo2022-0292.1.
Models (constructor input order)
vp(m/s): TTI acoustic reference velocity.epsilon: Thomsen epsilon parameter.delta: Thomsen delta parameter.theta(rad): Tilt angle parameter.
Wavefields
h1(aliases:pressure,p): Primary acoustic-TTI pressure-like wavefield; default source and receiver.h2(aliases:pressure_prev): Previous-step 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 pseudo-acoustic TTI equation operator.
Parameters:
-
spatial_order–FD accuracy order of the spatial Laplacian and the auxiliary first-derivative kernels used by the rotated-anisotropy term — 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, …). This equation has no compiledimpl='c'path; useimpl='eager'(the default). Defaults to 4. -
device–Device for the operator's static kernels. Use
'cuda'/ atorch.devicefor GPU eager runs. Defaults to'cpu'. -
backend–Array / programming backend,
'torch'or'jax'. Defaults to'torch'. Requires the matching array library to be importable. -
dim–Stored dimensionality. Always
2for this class. Defaults to 2.
supports_free_surface
class-attribute
¶
bool(x) -> bool
Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.
sweep.equations.AcousticTariq ¶
Bases: sweep.equations.base.SecondOrderEquation
Second-order 2-D pseudo-acoustic VTI/TTI wave equation (Alkhalifah eta).
Two-field pseudo-acoustic formulation: the primary pressure-like
field h1 is coupled to an auxiliary integrated field f1
through the anellipticity parameter eta. The split into
(h1, f1) is what suppresses the shear-mode artifact that the
original Alkhalifah pseudo-acoustic exhibits. The model parameter
v here is the NMO velocity (v = vp · sqrt(1 + 2 delta)),
not the horizontal velocity; vv is the squared vertical
velocity. Source must include h1 (default
source_type=['h1'] is set by the propagator).
Reference: Alkhalifah T. 2000, An acoustic wave equation for anisotropic media, 10.1190/1.1444815.
Models (constructor input order)
vv: Squared vertical velocity-like parameter for the Tariq qP formulation.v(m/s): Velocity-like parameter for the Tariq qP formulation.eta: Anellipticity parameter for the Tariq qP formulation.
Wavefields
h1(aliases:pressure,p): Primary acoustic-Tariq qP pressure-like wavefield; default source and receiver.h2(aliases:pressure_prev): Previous-step pressure-like wavefield (internal).f1: Auxiliary wavefield integrating the primary pressure (Tariq qP) (internal).f2: Previous-step auxiliary wavefield (Tariq qP) (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 Alkhalifah-eta pseudo-acoustic equation operator.
Parameters:
-
spatial_order–FD accuracy order of the spatial Laplacian and the auxiliary first-derivative kernels — 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, …). This equation has no compiledimpl='c'path; useimpl='eager'(the default). Defaults to 4. -
device–Device for the operator's static kernels. Use
'cuda'/ atorch.devicefor GPU eager runs. Defaults to'cpu'. -
backend–Array / programming backend,
'torch'or'jax'. Defaults to'torch'. -
dim–Stored dimensionality. Always
2for this class. Defaults to 2.
supports_free_surface
class-attribute
¶
bool(x) -> bool
Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.
sweep.equations.AcousticVTI1st ¶
Bases: sweep.equations.base.FirstOrderEquation
First-order 2-D acoustic VTI wave equation on a standard staggered grid.
Velocity-stress formulation (Duveneck et al. 2008): four wavefields
(vx, vz, sH, sV) evolve together with four CPML memory variables.
The system uses the Alkhalifah (1998) V_S = 0 approximation, so
only two independent normal stresses exist: sH = sigma_11 =
sigma_22 (horizontal) and sV = sigma_33 (vertical). The four
cached stiffness coefficients are c11 = rho · vp² · (1 + 2·eps),
c33 = rho · vp², c13 = rho · vp² · sqrt(1 + 2·delta), and
inv_rho = 1 / rho. Variable density is supported natively; CPML
is the staggered-grid cpmls variant (8 profiles).
Stability requires eps >= delta everywhere
(Grechka et al. 2004); prepare_models issues a runtime warning
when this is violated. Free-surface BC is not yet supported (the
constructor raises NotImplementedError for free_surface=True)
— see the TODO_free_surface comment on the class. Also exposed
as :class:AcousticAniso(method='duveneck', symmetry='vti').
References
Duveneck E. et al. 2008, Acoustic VTI wave equations and their application for anisotropic reverse-time migration, SEG Las Vegas 2008, DOI: 10.1190/1.3059320. Alkhalifah T. 1998, Acoustic approximations for processing in TI media, Geophysics 63, 623–631. Thomsen L. 1986, Weak elastic anisotropy, Geophysics 51, 1954–1966.
Models (constructor input order)
vp(m/s): Vertical P-wave velocity.epsilon: Thomsen epsilon anisotropy parameter (ε ≥ δ required).delta: Thomsen delta anisotropy parameter.rho(kg/m^3): Density.
Wavefields
vx(aliases:velocity_x): Particle velocity in x.vz(aliases:velocity_z): Particle velocity in z; default receiver.sH(aliases:stress_h,sigma_H): Horizontal normal stress σ_11 = σ_22; default source.sV(aliases:stress_v,sigma_V): Vertical normal stress σ_33; default source.m_sHx: CPML memory variable for ∂σ_H/∂x (internal).m_sVz: CPML memory variable for ∂σ_V/∂z (internal).m_vxx: CPML memory variable for ∂v_x/∂x (internal).m_vzz: CPML memory variable for ∂v_z/∂z (internal).
Defaults
source_type:['sH', 'sV']receiver_type:['vz']pml_type:'cpmls'
Build the 2-D first-order acoustic VTI equation operator.
Parameters:
-
spatial_order–FD accuracy order of the staggered first-derivative operator — 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_vti_1st_2d/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'. Defaults to'torch'. -
free_surface–Enable a free-surface BC on the top face. Not currently supported for the VTI system — the naive isotropic image method is physically incorrect because the
sigma_V = 0constraint couplesd(vz)/dztod(vx)/dxvia the off-diagonal stiffnessc13(Robertsson 1996; Mittet 2002). PassingTrueraisesNotImplementedError; use absorbing PML on all four sides instead. Defaults toFalse.
C_NAME
class-attribute
¶
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
cuda_layout
property
¶
CUDA buffer layout.
base_nvar = 4 (vx, vz, sH, sV)
pml_nvar = 4 (m_sHx, m_sVz, m_vxx, m_vzz)
last_two_storage_nvar = 4 (snapshot of vx, vz, sH, sV)
backward_workspace_nvar = 5 (the compiled backward's scratch: two
pre-multiplication buffers, one
read-only zero "previous stress", and
the two chunk-boundary seeds of the
checkpoint mode; the 8 adjoint
wavefields are passed separately via
adjoint_wavefields).
supports_free_surface
class-attribute
¶
bool(x) -> bool
Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.
prepare_models ¶
Pre-compute stiffness coefficients from Thomsen parameters.
Warns (via warnings.warn) when ε < δ anywhere, since this
violates the stability condition identified by Grechka, Zhang, Rector
(2004), Geophysics 69, 576.
Cached outputs: c11 = ρV_P²(1+2ε), c33 = ρV_P², c13 = ρV_P²√(1+2δ), inv_rho = 1/ρ.
References¶
Thomsen (1986) Geophysics 51, 1954–1966. (ε, δ parameterisation.) Grechka et al. (2004) Geophysics 69, 576. (ε ≥ δ stability.)
recommended_dt
classmethod
¶
CFL-stable time step for the 2-D fourth-order scheme.
Δt ≤ CFL · h / (V_P_max · √(1 + 2 ε_max))
Parameters¶
vp_max : float Maximum vertical P-wave velocity in the model (m/s). epsilon_max : float Maximum Thomsen ε in the model. h : float Grid spacing (m). cfl : float, optional CFL number. Default 0.5 (safe for 4th-order spatial scheme).
sweep.equations.AcousticVTI1st3D ¶
Bases: sweep.equations.base.FirstOrderEquation
First-order 3-D acoustic VTI wave equation on a standard staggered grid.
Three-dimensional generalisation of :class:AcousticVTI1st: five
wavefields (vx, vy, vz, sH, sV) evolve together with six CPML
memory variables. The horizontal isotropy of VTI media gives
sH = sigma_11 = sigma_22 so only two distinct normal stresses
are tracked. Same Duveneck (2008) cached stiffness as the 2-D
variant. Variable density; CPML cpmls (12 profiles). Free
surface is not yet supported. Also exposed as
:class:AcousticAniso(method='duveneck', symmetry='vti', ndim=3).
Reference: Duveneck E. et al. 2008, 10.1190/1.3059320.
Models (constructor input order)
vp(m/s): Vertical P-wave velocity.epsilon: Thomsen epsilon anisotropy parameter (ε ≥ δ required).delta: Thomsen delta anisotropy parameter.rho(kg/m^3): Density.
Wavefields
vx(aliases:velocity_x): Particle velocity in x.vy(aliases:velocity_y): Particle velocity in y.vz(aliases:velocity_z): Particle velocity in z; default receiver.sH(aliases:stress_h,sigma_H): Horizontal normal stress σ_11 = σ_22; default source.sV(aliases:stress_v,sigma_V): Vertical normal stress σ_33; default source.m_sHx: CPML memory variable for ∂σ_H/∂x (internal).m_sHy: CPML memory variable for ∂σ_H/∂y (internal).m_sVz: CPML memory variable for ∂σ_V/∂z (internal).m_vxx: CPML memory variable for ∂v_x/∂x (internal).m_vyy: CPML memory variable for ∂v_y/∂y (internal).m_vzz: CPML memory variable for ∂v_z/∂z (internal).
Defaults
source_type:['sH', 'sV']receiver_type:['vz']pml_type:'cpmls'
Build the 3-D first-order acoustic VTI equation operator.
Parameters:
-
spatial_order–FD accuracy order of the staggered first-derivative operator — 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_vti_1st_3d/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'. Defaults to'torch'. -
free_surface–Enable a free-surface BC on the top face. Not currently supported for the VTI system — same reason as the 2-D case (see :class:
AcousticVTI1st). PassingTrueraisesNotImplementedError. Defaults toFalse.
C_NAME
class-attribute
¶
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
cuda_layout
property
¶
CUDA buffer layout.
base_nvar = 5 (vx, vy, vz, sH, sV)
pml_nvar = 6 (m_sHx, m_sHy, m_sVz, m_vxx, m_vyy, m_vzz)
last_two_storage_nvar = 5 (snapshot of vx, vy, vz, sH, sV)
backward_workspace_nvar = 6 (the compiled backward's scratch: three
pre-multiplication buffers, one read-only
zero "previous stress", and the two
chunk-boundary seeds of the checkpoint
mode; the 11 adjoint wavefields are
passed separately via
adjoint_wavefields).
supports_free_surface
class-attribute
¶
bool(x) -> bool
Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.
prepare_models ¶
Pre-compute stiffness coefficients (identical logic to 2-D).
See AcousticVTI1st.prepare_models for details.
recommended_dt
classmethod
¶
CFL-stable time step for the 3-D fourth-order scheme.
Same formula as the 2-D case (the fast horizontal P velocity governs).