specfem::kokkos_kernels

namespace kokkos_kernels

Kokkos-based computational kernels for SPECFEM++ finite element simulations.

This namespace contains high-performance computational kernels implemented using the Kokkos performance portability library for SPECFEM++ seismic wave propagation simulations. The kernels are designed to run efficiently on various computing architectures including CPUs, GPUs, and other accelerators.

specfem::kokkos_kernels::domain_kernels

template<specfem::wavefield::simulation_field WavefieldType, specfem::dimension::type DimensionTag, int NGLL>
class domain_kernels

Class to compute the domain kernels for the simulation.

This class computes the domain kernels for the simulation. It is a template class that takes the wavefield type, dimension tag, and number of GLL points as template parameters.

Template Parameters:
  • WavefieldType – Type of the wavefield (e.g., elastic, acoustic)

  • DimensionTag – Dimension tag (e.g., 2D, 3D)

  • NGLL – Number of GLL points

Public Functions

inline domain_kernels(const specfem::assembly::assembly<dimension_tag> &assembly)

Constructor for the domain_kernels class.

This constructor initializes the domain_kernels class with the given assembly object.

Note

The constructor initializes the coupling interfaces for 2D elastic and acoustic media.

Parameters:

assembly – The assembly object containing the mesh and other information

template<specfem::element::medium_tag medium>
inline int update_wavefields(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

Template Parameters:

medium – Medium for which the wacefield is updated

Parameters:

istep – Time step for which the wavefield is updated

Returns:

int Number of elements updated

inline void initialize(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 and inverts it for different medium types.

Parameters:

dt – Time step for the simulation

inline void compute_seismograms(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.

Parameters:

isig_step – Time step for which the seismograms are computed

specfem::kokkos_kernels::frechet_kernels

template<specfem::dimension::type DimensionTag, int NGLL>
class frechet_kernels

Compute kernels used to compute Frechet derivatives.

Template Parameters:
  • DimensionTag – Dimension of the problem.

  • NGLL – Number of GLL points.

Public Functions

inline frechet_kernels(const specfem::assembly::assembly<dimension_tag> &assembly)

Constructor.

Parameters:

assembly – Assembly object.

inline void compute_derivatives(const type_real &dt)

Compute the frechet derivatives at the current time step.

Parameters:

dt – Time interval.

Public Static Attributes

static constexpr auto dimension_tag = DimensionTag

Dimension of the problem.

Implementation Details