specfem::kokkos_kernels::impl::compute_stiffness_interaction

template<specfem::dimension::type DimensionTag, specfem::wavefield::simulation_field WavefieldType, int NGLL, specfem::element::medium_tag MediumTag, specfem::element::property_tag PropertyTag, specfem::element::boundary_tag BoundaryTag>
int specfem::kokkos_kernels::impl::compute_stiffness_interaction(const specfem::assembly::assembly<DimensionTag> &assembly, const int &istep)

Computes stiffness matrix-vector product for spectral element wave propagation.

Calculates elastic forces from displacement field gradients, applies stress-strain relations, computes divergence to get acceleration, and enforces boundary conditions. Core computational kernel for seismic wave simulation time stepping.

Template Parameters:
  • DimensionTag – Spatial dimension (2D/3D)

  • WavefieldType – Simulation field type (forward/backward/adjoint)

  • NGLL – Number of GLL points per element dimension

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

  • PropertyTag – Material properties (isotropic/anisotropic)

  • BoundaryTag – Boundary conditions (none/free_surface/absorbing)

Parameters:
  • assembly – Complete spectral element assembly with mesh, fields, properties

  • istep – Current time step for boundary value storage

Returns:

Number of processed elements matching template parameters