specfem::medium::compute_source_contribution

template<typename PointSourceType, typename PointPropertiesType>
auto specfem::medium::compute_source_contribution(const PointSourceType &point_source, const PointPropertiesType &point_properties)

Compute source contribution for seismic wave simulation.

Generic source computation interface that dispatches to medium-specific implementations. Computes force/moment contributions from seismic sources (earthquakes, explosions, etc.) at GLL nodes based on source type and material properties.

// Example usage for 2D elastic isotropic medium
using Source     = specfem::point::source<dim2, elastic, false>;
using Properties = specfem::point::properties<dim2, elastic, isotropic, false>;

Source     src   = ...;  // Initialize source parameters
Properties props = ...;  // Initialize material properties

auto source_contribution =
    specfem::medium::compute_source_contribution(src, props);

Template Parameters:
  • PointSourceType – Point-wise source parameters container

  • PointPropertiesType – Point-wise material properties container

Parameters:
  • point_source – Source parameters at quadrature point (specifies source time function and lagrange interpolants)

  • point_properties – Material properties at quadrature point

Returns:

Source force/moment contribution for wave equation

Implementation Details