PrincetonUniversity / SPECFEMPP

SPECFEM++ is a complete re-write of SPECFEM suite of packages (SPECFEM2D, SPECFEM3D, SPECFEM3D_GLOBE) using C++
https://specfem2d-kokkos.readthedocs.io/en/latest/
GNU General Public License v3.0
16 stars 9 forks source link

Elemental receivers #86

Closed Rohit-Kakodkar closed 1 year ago

Rohit-Kakodkar commented 1 year ago

Description

Implemeted elastic and acoustic elemental receivers. Computing seismograms require either scalar or array reductions. By default Kokkos does not support array reductions. To implement array reductions Kokkos needs arrays to be described as scalars. Check https://kokkos.github.io/kokkos-core-wiki/ProgrammingGuide/Custom-Reductions-Built-In-Reducers-with-Custom-Scalar-Types.html#example which implements an array as a scalar type.

We define our array types inside dimension class in specfem_enums.hpp. And the corresponding reductions inside specfem_setup.hpp. Check the compute seismogram method for more information on how reductions are carried out using the array type.

Things to do - receivers should be templated on seismogram types and every seismogram type should have a specialized implementation.

Issue Number

If there is an issue created for these changes, link it here

Checklist

Please make sure to check developer documentation on specfem docs.