ImpactX
|
#include <beamoptic.H>
Public Types | |
using | PType = ImpactXParticleContainer::ParticleType |
using | ParticleTileType = amrex::ParticleTile< amrex::SoAParticle< RealSoA::nattribs, IntSoA::nattribs >, RealSoA::nattribs, IntSoA::nattribs > |
Public Member Functions | |
PushSingleParticle (T_Element element, amrex::ParticleReal *AMREX_RESTRICT part_x, amrex::ParticleReal *AMREX_RESTRICT part_y, amrex::ParticleReal *AMREX_RESTRICT part_t, amrex::ParticleReal *AMREX_RESTRICT part_px, amrex::ParticleReal *AMREX_RESTRICT part_py, amrex::ParticleReal *AMREX_RESTRICT part_pt, uint64_t *AMREX_RESTRICT part_idcpu, RefPart ref_part) | |
PushSingleParticle ()=delete | |
PushSingleParticle (PushSingleParticle const &)=default | |
PushSingleParticle (PushSingleParticle &&)=default | |
~PushSingleParticle ()=default | |
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void | operator() (long i) const |
Private Attributes | |
T_Element const | m_element |
amrex::ParticleReal *const AMREX_RESTRICT | m_part_x |
amrex::ParticleReal *const AMREX_RESTRICT | m_part_y |
amrex::ParticleReal *const AMREX_RESTRICT | m_part_t |
amrex::ParticleReal *const AMREX_RESTRICT | m_part_px |
amrex::ParticleReal *const AMREX_RESTRICT | m_part_py |
amrex::ParticleReal *const AMREX_RESTRICT | m_part_pt |
uint64_t *const AMREX_RESTRICT | m_part_idcpu |
RefPart const | m_ref_part |
Push a single particle through an element
Note: we usually would just write a C++ lambda below in ParallelFor. But, due to restrictions in NVCC as of 11.5, we cannot write a lambda in a lambda as we also std::visit the element types of our lattice elements list. error #3206-D: An extended device lambda cannot be defined inside a generic lambda expression("operator()"). Thus, we fall back to writing a C++ functor here, instead of nesting two lambdas.
Nvidia bug report: 3458976 Minimal demonstrator: https://cuda.godbolt.org/z/39e4q53Ye
T_Element | This can be a |
using impactx::elements::detail::PushSingleParticle< T_Element >::ParticleTileType = amrex::ParticleTile<amrex::SoAParticle<RealSoA::nattribs, IntSoA::nattribs>,RealSoA::nattribs, IntSoA::nattribs> |
using impactx::elements::detail::PushSingleParticle< T_Element >::PType = ImpactXParticleContainer::ParticleType |
|
inline |
Constructor taking in pointers to particle data
element | the beamline element to push through |
part_x | the array to the particle position (x) |
part_y | the array to the particle position (y) |
part_t | the array to the particle position (t) |
part_px | the array to the particle momentum (x) |
part_py | the array to the particle momentum (y) |
part_pt | the array to the particle momentum (t) |
part_idcpu | the array to the particle global index |
ref_part | the struct containing the reference particle |
|
delete |
|
default |
|
default |
|
default |
|
inline |
Push a single particle through an element
i | particle index in the current box |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |