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

Transform functor for the Breit-Wheeler process. More...

#include <QEDPairGeneration.H>

Public Member Functions

 PairGenerationTransformFunc (BreitWheelerGeneratePairs generate_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 PairGenerationTransformFunc functor. More...
 
template<typename DstData , typename SrcData >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void operator() (DstData &dst1, DstData &dst2, SrcData &src, int const i_src, int const i_dst1, int const i_dst2, amrex::RandomEngine const &engine) const noexcept
 Functor call. It determines the properties of the generated pair and it sets to -1 the id of the source photon. More...
 

Private Attributes

const BreitWheelerGeneratePairs m_generate_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 Breit-Wheeler process.

Constructor & Destructor Documentation

◆ PairGenerationTransformFunc()

PairGenerationTransformFunc::PairGenerationTransformFunc ( BreitWheelerGeneratePairs  generate_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 PairGenerationTransformFunc functor.

A BreitWheelerGeneratePairs 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.

Parameters
[in]generate_functorfunctor to be called to determine the properties of the generated pairs
[in]a_ptiparticle iterator to iterate over photons undergoing QED pair generation 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 PairGenerationTransformFunc::operator() ( DstData &  dst1,
DstData &  dst2,
SrcData &  src,
int const  i_src,
int const  i_dst1,
int const  i_dst2,
amrex::RandomEngine const &  engine 
) const
inlinenoexcept

Functor call. It determines the properties of the generated pair and it sets to -1 the id of the source photon.

Parameters
[in,out]dst1target species 1 (either electrons or positrons)
[in,out]dst2target species 2 (either electrons or positrons)
[in]srcsource species (photons)
[in]i_srcparticle index of the source species
[in]i_dst1particle index of target species 1
[in]i_dst2particle index of target species 2
[in]enginerandom number generator engine

Member Data Documentation

◆ m_bx_arr

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

◆ m_Bx_external_particle

amrex::ParticleReal PairGenerationTransformFunc::m_Bx_external_particle
private

◆ m_bx_type

amrex::IndexType PairGenerationTransformFunc::m_bx_type
private

◆ m_by_arr

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

◆ m_By_external_particle

amrex::ParticleReal PairGenerationTransformFunc::m_By_external_particle
private

◆ m_by_type

amrex::IndexType PairGenerationTransformFunc::m_by_type
private

◆ m_bz_arr

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

◆ m_Bz_external_particle

amrex::ParticleReal PairGenerationTransformFunc::m_Bz_external_particle
private

◆ m_bz_type

amrex::IndexType PairGenerationTransformFunc::m_bz_type
private

◆ m_dx_arr

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

◆ m_ex_arr

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

◆ m_Ex_external_particle

amrex::ParticleReal PairGenerationTransformFunc::m_Ex_external_particle
private

◆ m_ex_type

amrex::IndexType PairGenerationTransformFunc::m_ex_type
private

◆ m_ey_arr

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

◆ m_Ey_external_particle

amrex::ParticleReal PairGenerationTransformFunc::m_Ey_external_particle
private

◆ m_ey_type

amrex::IndexType PairGenerationTransformFunc::m_ey_type
private

◆ m_ez_arr

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

◆ m_Ez_external_particle

amrex::ParticleReal PairGenerationTransformFunc::m_Ez_external_particle
private

◆ m_ez_type

amrex::IndexType PairGenerationTransformFunc::m_ez_type
private

◆ m_galerkin_interpolation

bool PairGenerationTransformFunc::m_galerkin_interpolation
private

◆ m_generate_functor

const BreitWheelerGeneratePairs PairGenerationTransformFunc::m_generate_functor
private

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

◆ m_get_externalEB

GetExternalEBField PairGenerationTransformFunc::m_get_externalEB
private

◆ m_get_position

GetParticlePosition<PIdx> PairGenerationTransformFunc::m_get_position
private

◆ m_lo

amrex::Dim3 PairGenerationTransformFunc::m_lo
private

◆ m_n_rz_azimuthal_modes

int PairGenerationTransformFunc::m_n_rz_azimuthal_modes
private

◆ m_nox

int PairGenerationTransformFunc::m_nox
private

◆ m_xyzmin_arr

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

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