Elastic¶
class Elastic(
spatial_order=4,
device="cpu",
backend="torch",
)
Implementation:
src/sweep/equations/elastic.py
First-order 2D elastic velocity-stress equation.
Note
This formulation uses velocity and stress wavefields together with multiple CPML memory variables, so its state is much larger than the acoustic one.
Parameters¶
spatial_order(int, optional): Finite-difference order. It should be an even number.device(device orstr, optional): Target device used to place derivative operators and backend-specific tensors.backend(str, optional): Numerical backend, typically"torch". If you plan to run withPropCUDA, this should still normally be"torch"rather than"cuda".
Models¶
models(list[str]):["vp", "vs", "rho"]
Required models:
vp: P-wave velocityvs: S-wave velocityrho: density
Wavefields¶
wavefields(list[str]):["vx", "vz", "sxx", "szz", "sxz", "m_vxx", "m_vxz", "m_vzx", "m_vzz", "m_txxx", "m_txxz", "m_tzzx", "m_tzzz", "m_txzx", "m_txzz"]
The first five entries are the physical velocity-stress fields. The remaining entries are CPML memory variables.
Field Metadata¶
This class defines structured field metadata through FieldSpec.
Model Metadata¶
This class defines structured model metadata through ModelSpec.
Required models:
vpalias:p_velocityMeaning: elastic P-wave velocity model Units:m/svsalias:s_velocityMeaning: elastic S-wave velocity model Units:m/srhoalias:densityMeaning: density model Units:kg/m^3
User-facing fields:
vxalias:velocity_xMeaning: particle velocity in the x directionvzalias:velocity_zMeaning: particle velocity in the z directionsxxalias:stress_xxMeaning: normal stress in the x directionszzalias:stress_zzMeaning: normal stress in the z directionsxzaliases:stress_xz,shear_xzMeaning: shear stress component
Internal fields:
m_vxx,m_vxz,m_vzx,m_vzzm_txxx,m_txxz,m_tzzx,m_tzzz,m_txzx,m_txzz
These internal fields are boundary-related CPML memory variables and are
filtered out by default from available_fields().
Useful helpers:
available_fields()available_fields(role="source")available_fields(role="receiver")describe_field(name)
Defaults:
default_source_fields:["sxx", "szz"]default_receiver_fields:["vx", "vz"]
Backend Behavior¶
- implemented as a first-order equation using
PartialDerivative - supports compiled CUDA binding through
_C()
CUDA Layout¶
For the compiled CUDA propagator, this equation exposes:
cuda_layout
This groups the CUDA runtime buffer and workspace metadata used by PropCUDA.
Torch Binding¶
supports_torch_binding():True