|
WarpX
|
Typedefs | |
| using | ParticleType = typename WarpXParticleContainer::ParticleType |
| using | ParticleBins = DenseBins<ParticleTileDataType> |
| using | ParticleTileType = typename WarpXParticleContainer::ParticleTileType |
| using | ParticleTileDataType = typename ParticleTileType::ParticleTileDataType |
Functions | |
| amrex::DenseBins< ParticleTileDataType > | findParticlesInEachCell (amrex::Geometry const &geom_lev, amrex::MFIter const &mfi, WarpXParticleContainer::ParticleTileType &ptile) |
| Find the particles and count the particles that are in each cell. More specifically this function returns an amrex::DenseBins object containing an offset array and a permutation array which can be used to loop over all the cells in a tile and apply an algorithm to particles of a given species present in each cell. Note that this does not rearrange particle arrays. | |
| AMREX_GPU_HOST_DEVICE AMREX_INLINE void | getCollisionEnergy (amrex::ParticleReal const u2, double const m, double const M, double &gamma, double &energy) |
Return (relativistic) collision energy assuming the target (with mass M) is stationary and the projectile is approaching with the the given speed and mass m. Note the use of double since this calculation is prone to error with single precision. | |
| AMREX_GPU_HOST_DEVICE AMREX_INLINE void | doLorentzTransform (amrex::ParticleReal &ux, amrex::ParticleReal &uy, amrex::ParticleReal &uz, amrex::ParticleReal const Vx, amrex::ParticleReal const Vy, amrex::ParticleReal const Vz) |
| Perform a Lorentz transformation of the given velocity to a frame moving with velocity (Vx, Vy, Vz) relative to the present one. | |
| AMREX_GPU_HOST_DEVICE AMREX_INLINE void | doLorentzTransformWithU (amrex::ParticleReal &ux, amrex::ParticleReal &uy, amrex::ParticleReal &uz, amrex::ParticleReal const Ux, amrex::ParticleReal const Uy, amrex::ParticleReal const Uz) |
| Perform a Lorentz transformation of the given velocity to a frame moving with gamma*velocity (Ux, Uy, Uz) relative to the present one. | |
| AMREX_GPU_HOST_DEVICE AMREX_INLINE void | doLorentzTransformWithP (amrex::ParticleReal &px, amrex::ParticleReal &py, amrex::ParticleReal &pz, amrex::ParticleReal mass, amrex::ParticleReal const Ux, amrex::ParticleReal const Uy, amrex::ParticleReal const Uz) |
| Perform a Lorentz transformation of the given momentum to a frame moving with gamma*velocity (Ux, Uy, Uz) relative to the present one. | |
| AMREX_GPU_HOST_DEVICE AMREX_INLINE void | getRandomVector (amrex::ParticleReal &x, amrex::ParticleReal &y, amrex::ParticleReal &z, amrex::RandomEngine const &engine) |
| Generate random unit vector in 3 dimensions https://mathworld.wolfram.com/SpherePointPicking.html. | |
| AMREX_GPU_HOST_DEVICE AMREX_INLINE void | RandomizeVelocity (amrex::ParticleReal &ux, amrex::ParticleReal &uy, amrex::ParticleReal &uz, const amrex::ParticleReal vp, amrex::RandomEngine const &engine) |
| Function to perform scattering of a particle that results in a random velocity vector with given magnitude. This is used in isotropic collision events. | |
| AMREX_GPU_HOST_DEVICE AMREX_INLINE bool | containsInclusive (amrex::RealBox const &tilebox, amrex::XDim3 const point) |
| template<typename T_index> | |
| AMREX_GPU_HOST_DEVICE AMREX_INLINE bool | ModifyEnergyPairwise (amrex::ParticleReal *const AMREX_RESTRICT uxp, amrex::ParticleReal *const AMREX_RESTRICT uyp, amrex::ParticleReal *const AMREX_RESTRICT uzp, amrex::ParticleReal *const AMREX_RESTRICT w, T_index const *const AMREX_RESTRICT indices, T_index const cell_start, T_index const cell_stop, amrex::ParticleReal const mass, amrex::ParticleReal const energy_fraction, amrex::ParticleReal const energy_fraction_max, amrex::ParticleReal &deltaE) |
| using ParticleUtils::ParticleTileDataType = typename ParticleTileType::ParticleTileDataType |
| using ParticleUtils::ParticleTileType = typename WarpXParticleContainer::ParticleTileType |
| using ParticleUtils::ParticleType = typename WarpXParticleContainer::ParticleType |
| AMREX_GPU_HOST_DEVICE AMREX_INLINE bool ParticleUtils::containsInclusive | ( | amrex::RealBox const & | tilebox, |
| amrex::XDim3 const | point ) |
| AMREX_GPU_HOST_DEVICE AMREX_INLINE void ParticleUtils::doLorentzTransform | ( | amrex::ParticleReal & | ux, |
| amrex::ParticleReal & | uy, | ||
| amrex::ParticleReal & | uz, | ||
| amrex::ParticleReal const | Vx, | ||
| amrex::ParticleReal const | Vy, | ||
| amrex::ParticleReal const | Vz ) |
Perform a Lorentz transformation of the given velocity to a frame moving with velocity (Vx, Vy, Vz) relative to the present one.
| [in,out] | ux,uy,uz | components of velocity vector in the current frame - importantly these quantities are gamma * velocity |
| [in] | Vx,Vy,Vz | velocity of the new frame relative to the current one, NOT gamma*velocity! |
| AMREX_GPU_HOST_DEVICE AMREX_INLINE void ParticleUtils::doLorentzTransformWithP | ( | amrex::ParticleReal & | px, |
| amrex::ParticleReal & | py, | ||
| amrex::ParticleReal & | pz, | ||
| amrex::ParticleReal | mass, | ||
| amrex::ParticleReal const | Ux, | ||
| amrex::ParticleReal const | Uy, | ||
| amrex::ParticleReal const | Uz ) |
Perform a Lorentz transformation of the given momentum to a frame moving with gamma*velocity (Ux, Uy, Uz) relative to the present one.
| [in,out] | px,py,pz | components of momentum vector in the current frame |
| [in] | mass | the particle mass |
| [in] | Ux,Uy,Uz | velocity of the new frame relative to the current one, importantly these quantities are gamma * velocity |
| AMREX_GPU_HOST_DEVICE AMREX_INLINE void ParticleUtils::doLorentzTransformWithU | ( | amrex::ParticleReal & | ux, |
| amrex::ParticleReal & | uy, | ||
| amrex::ParticleReal & | uz, | ||
| amrex::ParticleReal const | Ux, | ||
| amrex::ParticleReal const | Uy, | ||
| amrex::ParticleReal const | Uz ) |
Perform a Lorentz transformation of the given velocity to a frame moving with gamma*velocity (Ux, Uy, Uz) relative to the present one.
| [in,out] | ux,uy,uz | components of velocity vector in the current frame - importantly these quantities are gamma * velocity |
| [in] | Ux,Uy,Uz | velocity of the new frame relative to the current one, importantly these quantities are gamma * velocity |
| amrex::DenseBins< ParticleTileDataType > ParticleUtils::findParticlesInEachCell | ( | amrex::Geometry const & | geom_lev, |
| amrex::MFIter const & | mfi, | ||
| WarpXParticleContainer::ParticleTileType & | ptile ) |
Find the particles and count the particles that are in each cell. More specifically this function returns an amrex::DenseBins object containing an offset array and a permutation array which can be used to loop over all the cells in a tile and apply an algorithm to particles of a given species present in each cell. Note that this does not rearrange particle arrays.
| [in] | geom_lev | the geometry of the current refinement level. |
| [in] | mfi | the MultiFAB iterator. |
| [in] | ptile | the particle tile. |
| AMREX_GPU_HOST_DEVICE AMREX_INLINE void ParticleUtils::getCollisionEnergy | ( | amrex::ParticleReal const | u2, |
| double const | m, | ||
| double const | M, | ||
| double & | gamma, | ||
| double & | energy ) |
Return (relativistic) collision energy assuming the target (with mass M) is stationary and the projectile is approaching with the the given speed and mass m. Note the use of double since this calculation is prone to error with single precision.
| [in] | u2 | square of particle speed (i.e. u dot u where u = gamma*v) |
| [in] | m,M | mass of projectile and target, respectively |
| [out] | gamma | relativistic factor of the particle |
| [out] | energy | particle energy in eV |
| AMREX_GPU_HOST_DEVICE AMREX_INLINE void ParticleUtils::getRandomVector | ( | amrex::ParticleReal & | x, |
| amrex::ParticleReal & | y, | ||
| amrex::ParticleReal & | z, | ||
| amrex::RandomEngine const & | engine ) |
Generate random unit vector in 3 dimensions https://mathworld.wolfram.com/SpherePointPicking.html.
| [out] | x | x-component of resulting random vector |
| [out] | y | y-component of resulting random vector |
| [out] | z | z-component of resulting random vector |
| [in] | engine | the random-engine |
| AMREX_GPU_HOST_DEVICE AMREX_INLINE bool ParticleUtils::ModifyEnergyPairwise | ( | amrex::ParticleReal *const AMREX_RESTRICT | uxp, |
| amrex::ParticleReal *const AMREX_RESTRICT | uyp, | ||
| amrex::ParticleReal *const AMREX_RESTRICT | uzp, | ||
| amrex::ParticleReal *const AMREX_RESTRICT | w, | ||
| T_index const *const AMREX_RESTRICT | indices, | ||
| T_index const | cell_start, | ||
| T_index const | cell_stop, | ||
| amrex::ParticleReal const | mass, | ||
| amrex::ParticleReal const | energy_fraction, | ||
| amrex::ParticleReal const | energy_fraction_max, | ||
| amrex::ParticleReal & | deltaE ) |
| AMREX_GPU_HOST_DEVICE AMREX_INLINE void ParticleUtils::RandomizeVelocity | ( | amrex::ParticleReal & | ux, |
| amrex::ParticleReal & | uy, | ||
| amrex::ParticleReal & | uz, | ||
| const amrex::ParticleReal | vp, | ||
| amrex::RandomEngine const & | engine ) |
Function to perform scattering of a particle that results in a random velocity vector with given magnitude. This is used in isotropic collision events.
| [in,out] | ux,uy,uz | colliding particle's velocity |
| [in] | vp | velocity magnitude of the colliding particle after collision. |
| [in] | engine | the random-engine |