WarpX
Public Member Functions | Private Attributes | List of all members
PhotonEmissionTransformFunc Class Reference

Transform functor for the QED photon emission process. More...

#include <QEDPhotonEmission.H>

Public Member Functions

 PhotonEmissionTransformFunc (QuantumSynchrotronGetOpticalDepth opt_depth_functor, int opt_depth_runtime_comp, QuantumSynchrotronPhotonEmission emission_functor, const WarpXParIter &a_pti, int lev, amrex::IntVect ngEB, amrex::FArrayBox const &exfab, amrex::FArrayBox const &eyfab, amrex::FArrayBox const &ezfab, amrex::FArrayBox const &bxfab, amrex::FArrayBox const &byfab, amrex::FArrayBox const &bzfab, amrex::Vector< amrex::ParticleReal > &E_external_particle, amrex::Vector< amrex::ParticleReal > &B_external_particle, int a_offset=0)
 Constructor of the PhotonEmissionTransformFunc functor. More...
 
template<typename DstData , typename SrcData >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void operator() (DstData &dst, SrcData &src, int i_src, int i_dst, amrex::RandomEngine const &engine) const noexcept
 Functor call. It determines the properties of the generated photon and updates the momentum of the source particle. More...
 

Private Attributes

const QuantumSynchrotronGetOpticalDepth m_opt_depth_functor
 
const int m_opt_depth_runtime_comp = 0
 
const QuantumSynchrotronPhotonEmission m_emission_functor
 
GetParticlePosition< PIdxm_get_position
 
GetExternalEBField m_get_externalEB
 
amrex::ParticleReal m_Ex_external_particle
 
amrex::ParticleReal m_Ey_external_particle
 
amrex::ParticleReal m_Ez_external_particle
 
amrex::ParticleReal m_Bx_external_particle
 
amrex::ParticleReal m_By_external_particle
 
amrex::ParticleReal m_Bz_external_particle
 
amrex::Array4< const amrex::Real > m_ex_arr
 
amrex::Array4< const amrex::Real > m_ey_arr
 
amrex::Array4< const amrex::Real > m_ez_arr
 
amrex::Array4< const amrex::Real > m_bx_arr
 
amrex::Array4< const amrex::Real > m_by_arr
 
amrex::Array4< const amrex::Real > m_bz_arr
 
amrex::IndexType m_ex_type
 
amrex::IndexType m_ey_type
 
amrex::IndexType m_ez_type
 
amrex::IndexType m_bx_type
 
amrex::IndexType m_by_type
 
amrex::IndexType m_bz_type
 
amrex::GpuArray< amrex::Real, 3 > m_dx_arr
 
amrex::GpuArray< amrex::Real, 3 > m_xyzmin_arr
 
bool m_galerkin_interpolation
 
int m_nox
 
int m_n_rz_azimuthal_modes
 
amrex::Dim3 m_lo
 

Detailed Description

Transform functor for the QED photon emission process.

Constructor & Destructor Documentation

◆ PhotonEmissionTransformFunc()

PhotonEmissionTransformFunc::PhotonEmissionTransformFunc ( QuantumSynchrotronGetOpticalDepth  opt_depth_functor,
int  opt_depth_runtime_comp,
QuantumSynchrotronPhotonEmission  emission_functor,
const WarpXParIter a_pti,
int  lev,
amrex::IntVect  ngEB,
amrex::FArrayBox const &  exfab,
amrex::FArrayBox const &  eyfab,
amrex::FArrayBox const &  ezfab,
amrex::FArrayBox const &  bxfab,
amrex::FArrayBox const &  byfab,
amrex::FArrayBox const &  bzfab,
amrex::Vector< amrex::ParticleReal > &  E_external_particle,
amrex::Vector< amrex::ParticleReal > &  B_external_particle,
int  a_offset = 0 
)

Constructor of the PhotonEmissionTransformFunc functor.

A QuantumSynchrotronGeneratePhotonAndUpdateMomentum functor is passed by value. However, it contains only few integer and real parameters and few pointers to the raw data of the lookup tables. Therefore, it should be rather lightweight to copy.

Also a QuantumSynchrotronGetOpticalDepth has to be passed, since the optical depth has to be re-initialized after each photon emission.

Parameters
[in]opt_depth_functorfunctor to re-initialize the optical depth of the source particles
[in]opt_depth_runtime_compindex of the optical depth component of the source species
[in]emission_functorfunctor to generate photons and update momentum of the source particles
[in]a_ptiparticle iterator to iterate over electrons or positrons undergoing QED photon emission process
[in]levthe mesh-refinement level
[in]ngEBnumber of guard cells allocated for the E and B MultiFabs
[in]exfabconstant reference to the FArrayBox of the x component of the electric field
[in]eyfabconstant reference to the FArrayBox of the y component of the electric field
[in]ezfabconstant reference to the FArrayBox of the z component of the electric field
[in]bxfabconstant reference to the FArrayBox of the x component of the magnetic field
[in]byfabconstant reference to the FArrayBox of the y component of the magnetic field
[in]bzfabconstant reference to the FArrayBox of the z component of the magnetic field
[in]a_offsetoffset to apply to the particle indices

Member Function Documentation

◆ operator()()

template<typename DstData , typename SrcData >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void PhotonEmissionTransformFunc::operator() ( DstData &  dst,
SrcData &  src,
int  i_src,
int  i_dst,
amrex::RandomEngine const &  engine 
) const
inlinenoexcept

Functor call. It determines the properties of the generated photon and updates the momentum of the source particle.

Parameters
[in,out]dsttarget species (photons)
[in,out]srcsource species (either electrons or positrons)
[in]i_srcparticle index of the source species
[in]i_dstparticle index of target species
[in]enginerandom number generator engine

Member Data Documentation

◆ m_bx_arr

amrex::Array4<const amrex::Real> PhotonEmissionTransformFunc::m_bx_arr
private

◆ m_Bx_external_particle

amrex::ParticleReal PhotonEmissionTransformFunc::m_Bx_external_particle
private

◆ m_bx_type

amrex::IndexType PhotonEmissionTransformFunc::m_bx_type
private

◆ m_by_arr

amrex::Array4<const amrex::Real> PhotonEmissionTransformFunc::m_by_arr
private

◆ m_By_external_particle

amrex::ParticleReal PhotonEmissionTransformFunc::m_By_external_particle
private

◆ m_by_type

amrex::IndexType PhotonEmissionTransformFunc::m_by_type
private

◆ m_bz_arr

amrex::Array4<const amrex::Real> PhotonEmissionTransformFunc::m_bz_arr
private

◆ m_Bz_external_particle

amrex::ParticleReal PhotonEmissionTransformFunc::m_Bz_external_particle
private

◆ m_bz_type

amrex::IndexType PhotonEmissionTransformFunc::m_bz_type
private

◆ m_dx_arr

amrex::GpuArray<amrex::Real, 3> PhotonEmissionTransformFunc::m_dx_arr
private

◆ m_emission_functor

const QuantumSynchrotronPhotonEmission PhotonEmissionTransformFunc::m_emission_functor
private

A copy of the functor to generate photons. It contains only pointers to the lookup tables.

◆ m_ex_arr

amrex::Array4<const amrex::Real> PhotonEmissionTransformFunc::m_ex_arr
private

◆ m_Ex_external_particle

amrex::ParticleReal PhotonEmissionTransformFunc::m_Ex_external_particle
private

◆ m_ex_type

amrex::IndexType PhotonEmissionTransformFunc::m_ex_type
private

◆ m_ey_arr

amrex::Array4<const amrex::Real> PhotonEmissionTransformFunc::m_ey_arr
private

◆ m_Ey_external_particle

amrex::ParticleReal PhotonEmissionTransformFunc::m_Ey_external_particle
private

◆ m_ey_type

amrex::IndexType PhotonEmissionTransformFunc::m_ey_type
private

◆ m_ez_arr

amrex::Array4<const amrex::Real> PhotonEmissionTransformFunc::m_ez_arr
private

◆ m_Ez_external_particle

amrex::ParticleReal PhotonEmissionTransformFunc::m_Ez_external_particle
private

◆ m_ez_type

amrex::IndexType PhotonEmissionTransformFunc::m_ez_type
private

◆ m_galerkin_interpolation

bool PhotonEmissionTransformFunc::m_galerkin_interpolation
private

◆ m_get_externalEB

GetExternalEBField PhotonEmissionTransformFunc::m_get_externalEB
private

◆ m_get_position

GetParticlePosition<PIdx> PhotonEmissionTransformFunc::m_get_position
private

◆ m_lo

amrex::Dim3 PhotonEmissionTransformFunc::m_lo
private

◆ m_n_rz_azimuthal_modes

int PhotonEmissionTransformFunc::m_n_rz_azimuthal_modes
private

◆ m_nox

int PhotonEmissionTransformFunc::m_nox
private

◆ m_opt_depth_functor

const QuantumSynchrotronGetOpticalDepth PhotonEmissionTransformFunc::m_opt_depth_functor
private

A copy of the functor to initialize the optical depth of the source species.

◆ m_opt_depth_runtime_comp

const int PhotonEmissionTransformFunc::m_opt_depth_runtime_comp = 0
private

Index of the optical depth component of source species

◆ m_xyzmin_arr

amrex::GpuArray<amrex::Real, 3> PhotonEmissionTransformFunc::m_xyzmin_arr
private

The documentation for this class was generated from the following files: