Skip to content

Single particle QED emission#174

Draft
haykh wants to merge 39 commits into1.4.0rcfrom
dev/emission
Draft

Single particle QED emission#174
haykh wants to merge 39 commits into1.4.0rcfrom
dev/emission

Conversation

@haykh
Copy link
Collaborator

@haykh haykh commented Jan 27, 2026

Structural changes

  • srpic.hpp is now subdivided into different dedicated header files with explicit functions.
  • Pusher_kernel now accepts an additional template argument: class E = NoEmissionPolicy_t<SimEngine::SRPIC, M>.

Major fixes/enhancements

  • Synchrotron and Compton emission implemented.
  • FIXED boundaries for fields now properly transform the passed field components from tetrad basis to code units.

Minor fixes/enhancements

  • support for 2D arrays in input file
  • -D TESTS=ON can now be used together with pgen to also compile all unit tests.
  • GRPIC now compiles when no init_flds is present in pgen

Emission

Emission is performed by passing a class to the pusher with the following two mandatory methods:

Inline auto EmissionPolicy::shouldEmit(
                 const coord_t<M::PrtlDim>&,
                 const coord_t<M::PrtlDim>&,
                 const vec_t<Dim::_3D>&,
                 const vec_t<Dim::_3D>&,
                 const vec_t<Dim::_3D>&,
                 vec_t<Dim::_3D>&,
                 Payload&) const -> Kokkos::pair<bool, bool>;

which returns two booleans to indicate whether a particle should be emitted and whether the emitting particle should experience a recoil (i.e. radiative drag); and

Inline void EmissionPolicy::emit(
                 const tuple_t<int, M::Dim>&,
                 const tuple_t<prtldx_t, M::Dim>&,
                 const vec_t<Dim::_3D>&,
                 real_t,
                 real_t,
                 const Payload&) const;

which actually does the emission. Here the type EmissionPolicy::Payload is defined within the class, and is used to store a temporary variable (such as the energy of the potentially emitted photon) and pass it between the functions (separate per each emitting particle).

@haykh haykh self-assigned this Jan 27, 2026
@haykh haykh added the enhancement New feature or request label Jan 27, 2026
@haykh haykh marked this pull request as draft January 27, 2026 21:40
@haykh haykh mentioned this pull request Feb 4, 2026
18 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant