|
WarpX
|
#include "Particles/Collision/BinaryCollision/BinaryCollisionUtils.H"#include "Utils/WarpXConst.H"#include <AMReX_Algorithm.H>#include <AMReX_Random.H>#include <AMReX_REAL.H>#include <cmath>Go to the source code of this file.
Functions | |
| template<typename index_type> | |
| AMREX_GPU_HOST_DEVICE AMREX_INLINE void | SingleLinearComptonCollisionEvent (const amrex::ParticleReal &u1x, const amrex::ParticleReal &u1y, const amrex::ParticleReal &u1z, const amrex::ParticleReal &u2x, const amrex::ParticleReal &u2y, const amrex::ParticleReal &u2z, amrex::ParticleReal w1, amrex::ParticleReal w2, const amrex::Real &dt, const amrex::ParticleReal &dV, const int &pair_index, index_type *AMREX_RESTRICT p_mask, amrex::ParticleReal *AMREX_RESTRICT p_pair_reaction_weight, const amrex::ParticleReal &event_multiplier, const int &multiplier_ratio, const amrex::ParticleReal &probability_threshold, const amrex::ParticleReal &probability_target_value, const amrex::RandomEngine &engine) |
| This function computes whether the collision between a photon and lepton results in a scattering event, using the algorithm described in Higginson et al., Journal of Computational Physics 388, 439-453 (2019). If the scattering occurs, the mask is set to true for that given pair of colliding macroparticles and the weight of the produced particles is stored in p_pair_reaction_weight. | |
| AMREX_GPU_HOST_DEVICE AMREX_INLINE void SingleLinearComptonCollisionEvent | ( | const amrex::ParticleReal & | u1x, |
| const amrex::ParticleReal & | u1y, | ||
| const amrex::ParticleReal & | u1z, | ||
| const amrex::ParticleReal & | u2x, | ||
| const amrex::ParticleReal & | u2y, | ||
| const amrex::ParticleReal & | u2z, | ||
| amrex::ParticleReal | w1, | ||
| amrex::ParticleReal | w2, | ||
| const amrex::Real & | dt, | ||
| const amrex::ParticleReal & | dV, | ||
| const int & | pair_index, | ||
| index_type *AMREX_RESTRICT | p_mask, | ||
| amrex::ParticleReal *AMREX_RESTRICT | p_pair_reaction_weight, | ||
| const amrex::ParticleReal & | event_multiplier, | ||
| const int & | multiplier_ratio, | ||
| const amrex::ParticleReal & | probability_threshold, | ||
| const amrex::ParticleReal & | probability_target_value, | ||
| const amrex::RandomEngine & | engine ) |
This function computes whether the collision between a photon and lepton results in a scattering event, using the algorithm described in Higginson et al., Journal of Computational Physics 388, 439-453 (2019). If the scattering occurs, the mask is set to true for that given pair of colliding macroparticles and the weight of the produced particles is stored in p_pair_reaction_weight.
| index_type | type of the index argument |
| [in] | u1x,u1y,u1z | momentum components of the first colliding particle (photon) |
| [in] | u2x,u2y,u2z | momentum components of the second colliding particle (lepton) |
| [in] | w1,w2 | effective weight of the colliding particles |
| [in] | dt | is the time step length between two collision calls. |
| [in] | dV | is the volume of the corresponding cell. |
| [in] | pair_index | is the index of the colliding pair |
| [out] | p_mask | is a mask that will be set to true if pair (electron-positron) production occurs for that pair of macrophotons |
| [out] | p_pair_reaction_weight | stores the weight of the product particles |
| [in] | event_multiplier | factor used to increase the number of pair-production events by decreasing the weight of the produced particles |
| [in] | multiplier_ratio | factor used to take into account unsampled pairs (i.e. the fact that a particle only collides with one or few particles of the other species) |
| [in] | probability_threshold | probability threshold above which we decrease the event multiplier |
| [in] | probability_target_value | if the probability threshold is exceeded, this is used to determine by how much the event multiplier is reduced |
| [in] | engine | the random engine. |