specfem::compute¶
-
namespace compute¶
Kokkos-based computational kernels.
This namespace contains computational kernels implemented using the Kokkos performance portability library. The kernels are designed to run efficiently on various computing architectures including CPUs, GPUs, and other accelerators.
specfem::compute::initialize_mass_matrix¶
-
template<int NGLL, typename Tags>
void specfem::compute::initialize_mass_matrix(specfem::assembly::assembly<Tags::dimension_tag> &assembly, const type_real &dt)¶ Initializes the mass matrix for the simulation.
This function initializes the mass matrix for the simulation. It computes the mass matrix, assembles shared boundary contributions across MPI ranks, and inverts the mass matrix for different medium types.
- Template Parameters:
WavefieldType – Type of the wavefield
DimensionTag – Dimension tag
NGLL – Number of GLL points
- Parameters:
assembly – The assembly object containing the mesh
dt – Time step for the simulation
specfem::compute::update_wavefields¶
-
template<int NGLL, typename Tags>
int specfem::compute::update_wavefields(specfem::assembly::assembly<Tags::dimension_tag> &assembly, const int istep)¶ Updates the wavefield for a given medium.
This function updates the wavefield for a given medium type. It computes the coupling, source interaction, stiffness interaction, and divides the mass matrix. The function is specialized for different medium types and properties.
- Template Parameters:
WavefieldType – Type of the wavefield
DimensionTag – Dimension tag
NGLL – Number of GLL points
MediumTag – Medium for which the wacefield is updated
- Parameters:
assembly – The assembly object containing the mesh
istep – Time step for which the wavefield is updated
- Returns:
int Number of elements updated
specfem::compute::compute_seismograms¶
-
template<int NGLL, typename Tags>
void specfem::compute::compute_seismograms(specfem::assembly::assembly<Tags::dimension_tag> &assembly, const int &isig_step)¶ Computes the seismograms for the simulation.
This function computes the seismograms for the simulation. It is specialized for different medium types and properties.
- Template Parameters:
WavefieldType – Type of the wavefield (e.g., elastic, acoustic)
DimensionTag – Dimension tag (e.g., 2D, 3D)
NGLL – Number of GLL points
- Parameters:
assembly – The assembly object containing the mesh and other
isig_step – Time step for which the seismograms are computed
specfem::compute::compute_derivatives¶
-
template<int NGLL, typename Tags>
void specfem::compute::compute_derivatives(const specfem::assembly::assembly<Tags::dimension_tag> &assembly, const type_real &dt)¶ Compute Frechet derivatives.
- Template Parameters:
DimensionTag – Dimension of the problem.
NGLL – Number of GLL points.
- Parameters:
assembly – Assembly object.
dt – Time interval.
Implementation Details¶
specfem::compute::impl::compute_mass_matrixspecfem::compute::impl::compute_stiffness_interactionspecfem::compute::impl::compute_source_interactionspecfem::compute::impl::compute_material_derivativesspecfem::compute::impl::compute_couplingspecfem::compute::impl::invert_mass_matrixspecfem::compute::impl::divide_mass_matrixspecfem::compute::impl::compute_seismograms