|
WarpX
|
This functor creates photons produced from a binary collision and sets their initial properties (position, momentum, weight). More...
#include <PhotonCreationFunc.H>
Public Member Functions | |
| PhotonCreationFunc ()=default | |
| Default constructor of the PhotonCreationFunc class. | |
| PhotonCreationFunc (const std::string &collision_name, MultiParticleContainer const *mypc) | |
| Constructor of the PhotonCreationFunc class. | |
| AMREX_INLINE amrex::Vector< int > | operator() (const index_type &n_total_pairs, ParticleTileType &ptile1, ParticleTileType &ptile2, const amrex::Vector< WarpXParticleContainer * > &pc_products, ParticleTileType **AMREX_RESTRICT tile_products, const amrex::ParticleReal &m1, const amrex::ParticleReal &m2, const amrex::Vector< amrex::ParticleReal > &, const index_type *AMREX_RESTRICT p_mask, const amrex::Vector< index_type > &products_np, const SmartCopy *AMREX_RESTRICT copy_species1, const SmartCopy *, const index_type *AMREX_RESTRICT p_pair_indices_1, const index_type *AMREX_RESTRICT p_pair_indices_2, const amrex::ParticleReal *AMREX_RESTRICT p_pair_reaction_weight, const amrex::ParticleReal *AMREX_RESTRICT p_product_data) const |
| operator() of the PhotonCreationFunc class. It creates new photon particles from binary collisions. One product particle is created at the position of the first parent particle that collided. For example, with the Bremsstrahlung collision between an electron and an ion, the new photon is created at the position of the electron. This function also sets the initial weight of the new photon to be the same as the weight of the first parent. This function sets the initial momentum of the product particles, by calling a function specific to the considered binary collision. Finally, this function subtracts the energy of the new photon from the first parent, i.e. the electron. | |
Private Types | |
| using | ParticleType = typename WarpXParticleContainer::ParticleType |
| using | ParticleTileType = typename WarpXParticleContainer::ParticleTileType |
| using | ParticleTileDataType = typename ParticleTileType::ParticleTileDataType |
| using | ParticleBins = amrex::DenseBins<ParticleTileDataType> |
| using | index_type = typename ParticleBins::index_type |
| using | SoaData_type = typename WarpXParticleContainer::ParticleTileType::ParticleTileDataType |
Private Attributes | |
| int | m_num_product_species |
| bool | m_create_photons |
| CollisionType | m_collision_type |
This functor creates photons produced from a binary collision and sets their initial properties (position, momentum, weight).
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
default |
Default constructor of the PhotonCreationFunc class.
| PhotonCreationFunc::PhotonCreationFunc | ( | const std::string & | collision_name, |
| MultiParticleContainer const * | mypc ) |
Constructor of the PhotonCreationFunc class.
| [in] | collision_name | the name of the collision |
| [in] | mypc | pointer to the MultiParticleContainer |
|
inline |
operator() of the PhotonCreationFunc class. It creates new photon particles from binary collisions. One product particle is created at the position of the first parent particle that collided. For example, with the Bremsstrahlung collision between an electron and an ion, the new photon is created at the position of the electron. This function also sets the initial weight of the new photon to be the same as the weight of the first parent. This function sets the initial momentum of the product particles, by calling a function specific to the considered binary collision. Finally, this function subtracts the energy of the new photon from the first parent, i.e. the electron.
| [in] | n_total_pairs | how many binary collisions have been performed in this tile |
| [in,out] | ptile1,ptile2 | the particle tiles of the two colliding species |
| [out] | pc_products | the products particle container |
| [out] | tile_products | array containing tile data of the product particles. |
| [in] | m1 | mass of the first colliding particle species |
| [in] | m2 | mass of the second colliding particle species |
| [in] | p_mask | a mask that is 1 if binary collision has resulted in particle creation event, 0 otherwise. |
| [in] | products_np | array storing the number of existing product particles in that tile |
| [in] | copy_species1 | array of functors used to copy data from the first colliding particle species to the product particles and to default initialize product particle quantities. |
| [in] | p_pair_indices_1 | array that stores the indices of the particles of the first colliding species that were used in the binary collisions (i.e. particle with index p_pair_indices_1[i] took part in collision i) |
| [in] | p_pair_indices_2 | array that stores the indices of the particles of the second colliding species that were used in the binary collisions (i.e. particle with index p_pair_indices_2[i] took part in collision i) |
| [in] | p_pair_reaction_weight | array that stores the photon weight |
| [in] | p_product_data | array that stores the photon energy |
|
private |
|
private |
|
private |