specfem::medium::compute_wavefield

template<specfem::dimension::type DimensionTag, specfem::element::medium_tag MediumTag, specfem::element::property_tag PropertyTag, typename ChunkIndexType, typename DisplacementFieldType, typename VelocityFieldType, typename AccelerationFieldType, typename QuadratureType, typename WavefieldViewType>
auto specfem::medium::compute_wavefield(const ChunkIndexType &chunk_index, const specfem::assembly::assembly<DimensionTag> &assembly, const QuadratureType &quadrature, const DisplacementFieldType &displacement, const VelocityFieldType &velocity, const AccelerationFieldType &acceleration, const specfem::wavefield::type &wavefield_component, WavefieldViewType wavefield_on_entire_grid)

Convert intrinsic fields values to wavefield of interest on GLL grid.

Computes specified wavefield component (displacement, velocity, acceleration, pressure, stress, etc.) from intrinsic field values at GLL nodes for different medium types using medium-specific implementations.

Template Parameters:
  • DimensionTag – Spatial dimension (dim2/dim3)

  • MediumTag – Medium type (acoustic, elastic, poroelastic)

  • PropertyTag – Property type (isotropic, anisotropic, etc.)

  • ChunkIndexType – Type of element chunk identifier

  • DisplacementFieldType – Type of displacement field

  • VelocityFieldType – Type of velocity field

  • AccelerationFieldType – Type of acceleration field

  • QuadratureType – Type of quadrature rule

  • WavefieldViewType – Kokkos view type for output wavefield

Parameters:
  • chunk_index – Element chunk identifier

  • assembly – Spectral element assembly information

  • quadrature – Quadrature rule for GLL nodes

  • displacement – Displacement field at GLL nodes

  • velocity – Velocity field at GLL nodes

  • acceleration – Acceleration field at GLL nodes

  • wavefield_component – Type of wavefield to compute

  • wavefield_on_entire_grid – Output wavefield values on GLL grid