WarpX
Functions
CollisionFilterFunc.H File Reference
#include "Particles/Collision/BinaryCollision/BinaryCollisionUtils.H"
#include "Particles/Collision/ScatteringProcess.H"
#include <AMReX_Random.H>

Go to the source code of this file.

Functions

template<typename index_type >
AMREX_GPU_HOST_DEVICE AMREX_INLINE void CollisionPairFilter (const amrex::ParticleReal u1x, const amrex::ParticleReal u1y, const amrex::ParticleReal u1z, const amrex::ParticleReal u2x, const amrex::ParticleReal u2y, const amrex::ParticleReal u2z, const amrex::ParticleReal m1, const amrex::ParticleReal m2, const amrex::ParticleReal w1, const 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 int multiplier, const int process_count, const ScatteringProcess::Executor *scattering_processes, const amrex::RandomEngine &engine)
 This function determines whether a collision occurs for a given pair of particles. More...
 

Function Documentation

◆ CollisionPairFilter()

template<typename index_type >
AMREX_GPU_HOST_DEVICE AMREX_INLINE void CollisionPairFilter ( const amrex::ParticleReal  u1x,
const amrex::ParticleReal  u1y,
const amrex::ParticleReal  u1z,
const amrex::ParticleReal  u2x,
const amrex::ParticleReal  u2y,
const amrex::ParticleReal  u2z,
const amrex::ParticleReal  m1,
const amrex::ParticleReal  m2,
const amrex::ParticleReal  w1,
const 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 int  multiplier,
const int  process_count,
const ScatteringProcess::Executor scattering_processes,
const amrex::RandomEngine engine 
)

This function determines whether a collision occurs for a given pair of particles.

Parameters
[in]u1x,u1y,u1zmomenta of the first colliding particle.
[in]u2x,u2y,u2zmomenta of the second colliding particle.
[in]m1,m2masses.
[in]w1,w2effective weight of the colliding particles.
[in]dtis the time step length between two collision calls.
[in]dVis the volume of the corresponding cell.
[in]pair_indexis the index of the colliding pair.
[out]p_maskis a mask that will be set to a non-zero integer if a collision occurs. The integer encodes the scattering process.
[out]p_pair_reaction_weightstores the weight of the product particles.
[in]multiplierfactor by which the collision probability is increased to account for all other possible binary collision partners.
[in]process_countnumber of scattering processes to consider.
[in]scatteringprocesses an array of scattering processes included for consideration.
[in]enginethe random engine.