WarpX
|
BackTransform functor to select particles and Lorentz Transform them and store in particle buffers. More...
#include <BackTransformParticleFunctor.H>
Public Member Functions | |
BackTransformParticleFunctor (WarpXParticleContainer *pc_src, std::string species_name, int num_buffers) | |
Functor to compute Lorentz Transform and store the selected particles in existing particle buffers. More... | |
void | operator() (PinnedMemoryParticleContainer &pc_dst, int &TotalParticleCounter, int i_buffer) const override |
void | InitData () override |
void | PrepareFunctorData (int i_buffer, bool z_slice_in_domain, amrex::Real old_z_boost, amrex::Real current_z_boost, amrex::Real t_lab, int snapshot_full) override |
Prepare data required to back-transform particle attributes for lab-frame snapshot, i_buffer. More... | |
![]() | |
ComputeParticleDiagFunctor ()=default | |
virtual | ~ComputeParticleDiagFunctor ()=default |
ComputeParticleDiagFunctor (const ComputeParticleDiagFunctor &)=default | |
ComputeParticleDiagFunctor & | operator= (const ComputeParticleDiagFunctor &)=default |
ComputeParticleDiagFunctor (ComputeParticleDiagFunctor &&)=default | |
ComputeParticleDiagFunctor & | operator= (ComputeParticleDiagFunctor &&)=default |
Private Attributes | |
WarpXParticleContainer * | m_pc_src = nullptr |
std::string | m_species_name |
int | m_num_buffers |
amrex::Vector< amrex::Real > | m_current_z_boost |
amrex::Vector< amrex::Real > | m_old_z_boost |
amrex::Vector< amrex::Real > | m_t_lab |
amrex::Vector< int > | m_perform_backtransform |
BackTransform functor to select particles and Lorentz Transform them and store in particle buffers.
BackTransformParticleFunctor::BackTransformParticleFunctor | ( | WarpXParticleContainer * | pc_src, |
std::string | species_name, | ||
int | num_buffers | ||
) |
Functor to compute Lorentz Transform and store the selected particles in existing particle buffers.
|
overridevirtual |
Reimplemented from ComputeParticleDiagFunctor.
|
overridevirtual |
Computes the Lorentz transform of source particles to obtain lab-frame data in pc_dst
Implements ComputeParticleDiagFunctor.
|
overridevirtual |
Prepare data required to back-transform particle attributes for lab-frame snapshot, i_buffer.
[in] | i_buffer | index of the snapshot |
[in] | z_slice_in_domain | if the z-slice at current_z_boost is within the bounds of the boosted-frame and lab-frame domain. The particles are transformed only if this value is true. |
[in] | old_z_boost | previous z-position of the slice in boosted frame |
[in] | current_z_boost | z co-ordinate of the slice selected in boosted-frame. |
[in] | t_lab | current time in lab-frame for snapshot, i_buffer. |
[in] | snapshot_full | if the current snapshot, with index, i_buffer, is full (1) or not (0). If it is full, then Lorentz-transform is not performed by setting m_perform_backtransform to 0 for the corresponding ith snapshot. |
Reimplemented from ComputeParticleDiagFunctor.
|
private |
Vector of current z co-ordinate in the boosted frame for each snapshot
|
private |
Number of buffers or snapshots
|
private |
Vector of previous z co-ordinate in the boosted frame for each snapshot
|
private |
Source particle container
|
private |
Vector of 0s and 1s stored to check if back-transformation is to be performed for the ith snapshot. The value is set to 0 (false) or 1 (true) using the boolean ZSliceInDomain in PrepareFunctorData()
|
private |
String containing species name of particles being transformed
|
private |
Vector of lab-frame time for each snapshot