ImpactX
|
Public Types | |
using | PType = ImpactXParticleContainer::ParticleType |
Public Member Functions | |
PushSingleParticle (T_Element element, PType *AMREX_RESTRICT aos_ptr, amrex::ParticleReal *AMREX_RESTRICT part_px, amrex::ParticleReal *AMREX_RESTRICT part_py, amrex::ParticleReal *AMREX_RESTRICT part_pt, 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 |
PType *const AMREX_RESTRICT | m_aos_ptr |
amrex::ParticleReal *const AMREX_RESTRICT | m_part_px |
amrex::ParticleReal *const AMREX_RESTRICT | m_part_py |
amrex::ParticleReal *const AMREX_RESTRICT | m_part_pt |
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::detail::PushSingleParticle< T_Element >::PType = ImpactXParticleContainer::ParticleType |
|
inline |
Constructor taking in pointers to particle data
element | the beamline element to push through |
aos_ptr | the array-of-struct with position and ids |
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) |
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 |