specfem::compute::impl::compute_mass_matrix

template<int NGLL, typename Tags>
void specfem::compute::impl::compute_mass_matrix(const type_real &dt, const specfem::assembly::assembly<Tags::dimension_tag> &assembly)

Compute the mass matrix for the given medium.

This function computes the mass matrix for the specified medium type and properties. It is specialized for different dimension tags, wavefield types, medium tags, property tags, and boundary tags.

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

  • WavefieldType – Simulation wavefield type (e.g., forward, adjoint, backward)

  • NGLL – Number of GLL points

  • MediumTag – Medium type (e.g., elastic, acoustic)

  • PropertyTag – Material property type (e.g., isotropic, anisotropic)

  • BoundaryTag – Boundary condition type (e.g., free_surface, absorbing)

Parameters:
  • dt – Time step size (used for time-dependent mass matrix computations)

  • assembly – SPECFEM++ assembly object.