WarpX
Loading...
Searching...
No Matches
SelectParticles Struct Reference

Filter to select particles that correspond to a z-slice of the corresponding lab-frame. More...

#include <BackTransformParticleFunctor.H>

Public Member Functions

 SelectParticles (const WarpXParticleContainer &pc, WarpXParIter &a_pti, amrex::Real current_z_boost, amrex::Real old_z_boost, int a_offset=0)
 Constructor of SelectParticles functor.
 
template<typename SrcData>
AMREX_GPU_HOST_DEVICE int operator() (const SrcData &src, int i) const noexcept
 Functor call. This method determines if a given particle should be selected for Lorentz transformation in obtaining the lab-frame data. The particles that with positions that correspond to the specific z-slice in boosted frame are selected.
 

Public Attributes

GetParticlePosition< PIdxm_get_position
 
amrex::Real m_current_z_boost
 
amrex::Real m_old_z_boost
 
amrex::ParticleReal *AMREX_RESTRICT zpold = nullptr
 

Detailed Description

Filter to select particles that correspond to a z-slice of the corresponding lab-frame.

Constructor & Destructor Documentation

◆ SelectParticles()

SelectParticles::SelectParticles ( const WarpXParticleContainer & pc,
WarpXParIter & a_pti,
amrex::Real current_z_boost,
amrex::Real old_z_boost,
int a_offset = 0 )

Constructor of SelectParticles functor.

Parameters
[in]pcWarpX particle container
[in]a_ptiWarpX particle iterator
[in]current_z_boostcurrent z-position of the slice in boosted frame
[in]old_z_boostprevious z-position of the slice in boosted frame
[in]a_offsetindex offset for particles to be selected

Member Function Documentation

◆ operator()()

template<typename SrcData>
AMREX_GPU_HOST_DEVICE int SelectParticles::operator() ( const SrcData & src,
int i ) const
inlinenoexcept

Functor call. This method determines if a given particle should be selected for Lorentz transformation in obtaining the lab-frame data. The particles that with positions that correspond to the specific z-slice in boosted frame are selected.

Template Parameters
SrcDatatype of source data
Parameters
[in]srcSrcData particle tile data
[in]iparticle index
Returns
1 if particles is selected for transformation, else 0

Member Data Documentation

◆ m_current_z_boost

amrex::Real SelectParticles::m_current_z_boost

Z coordinate in boosted frame that corresponds to a give snapshot

◆ m_get_position

GetParticlePosition<PIdx> SelectParticles::m_get_position

Object to extract the positions of the macroparticles inside a ParallelFor kernel

◆ m_old_z_boost

amrex::Real SelectParticles::m_old_z_boost

Previous Z coordinate in boosted frame that corresponds to a give snapshot

◆ zpold

amrex::ParticleReal* AMREX_RESTRICT SelectParticles::zpold = nullptr

Particle z coordinate in boosted frame


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