WarpX
Public Member Functions | Private Attributes | List of all members
BackTransformParticleFunctor Class Referencefinal

BackTransform functor to select particles and Lorentz Transform them and store in particle buffers. More...

#include <BackTransformParticleFunctor.H>

Inheritance diagram for BackTransformParticleFunctor:
ComputeParticleDiagFunctor

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...
 
- Public Member Functions inherited from ComputeParticleDiagFunctor
 ComputeParticleDiagFunctor ()=default
 
virtual ~ComputeParticleDiagFunctor ()=default
 
 ComputeParticleDiagFunctor (const ComputeParticleDiagFunctor &)=default
 
ComputeParticleDiagFunctoroperator= (const ComputeParticleDiagFunctor &)=default
 
 ComputeParticleDiagFunctor (ComputeParticleDiagFunctor &&)=default
 
ComputeParticleDiagFunctoroperator= (ComputeParticleDiagFunctor &&)=default
 

Private Attributes

WarpXParticleContainerm_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< intm_perform_backtransform
 

Detailed Description

BackTransform functor to select particles and Lorentz Transform them and store in particle buffers.

Constructor & Destructor Documentation

◆ BackTransformParticleFunctor()

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.

Member Function Documentation

◆ InitData()

void BackTransformParticleFunctor::InitData ( )
overridevirtual

Reimplemented from ComputeParticleDiagFunctor.

◆ operator()()

void BackTransformParticleFunctor::operator() ( PinnedMemoryParticleContainer pc_dst,
int TotalParticleCounter,
int  i_buffer 
) const
overridevirtual

Computes the Lorentz transform of source particles to obtain lab-frame data in pc_dst

Implements ComputeParticleDiagFunctor.

◆ PrepareFunctorData()

void BackTransformParticleFunctor::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 
)
overridevirtual

Prepare data required to back-transform particle attributes for lab-frame snapshot, i_buffer.

Parameters
[in]i_bufferindex of the snapshot
[in]z_slice_in_domainif 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_boostprevious z-position of the slice in boosted frame
[in]current_z_boostz co-ordinate of the slice selected in boosted-frame.
[in]t_labcurrent time in lab-frame for snapshot, i_buffer.
[in]snapshot_fullif 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.

Member Data Documentation

◆ m_current_z_boost

amrex::Vector<amrex::Real> BackTransformParticleFunctor::m_current_z_boost
private

Vector of current z co-ordinate in the boosted frame for each snapshot

◆ m_num_buffers

int BackTransformParticleFunctor::m_num_buffers
private

Number of buffers or snapshots

◆ m_old_z_boost

amrex::Vector<amrex::Real> BackTransformParticleFunctor::m_old_z_boost
private

Vector of previous z co-ordinate in the boosted frame for each snapshot

◆ m_pc_src

WarpXParticleContainer* BackTransformParticleFunctor::m_pc_src = nullptr
private

Source particle container

◆ m_perform_backtransform

amrex::Vector<int> BackTransformParticleFunctor::m_perform_backtransform
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()

◆ m_species_name

std::string BackTransformParticleFunctor::m_species_name
private

String containing species name of particles being transformed

◆ m_t_lab

amrex::Vector<amrex::Real> BackTransformParticleFunctor::m_t_lab
private

Vector of lab-frame time for each snapshot


The documentation for this class was generated from the following files: