WarpX
|
Functor that can be used to extract the positions of the macroparticles inside a ParallelFor kernel. More...
#include <GetAndSetPosition.H>
Public Types | |
using | RType = amrex::ParticleReal |
Public Member Functions | |
GetParticlePosition ()=default | |
template<typename ptiType > | |
GetParticlePosition (const ptiType &a_pti, long a_offset=0) noexcept | |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void | operator() (const long i, RType &x, RType &y, RType &z) const noexcept |
Extract the cartesian position coordinates of the particle located at index i + a_offset and store them in the variables x , y , z More... | |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void | AsStored (const long i, RType &x, RType &y, RType &z) const noexcept |
Extract the position coordinates of the particle as stored located at index i + a_offset and store them in the variables x , y , z This is only different for RZ since this returns (r, theta, z) in that case. More... | |
Public Attributes | |
const RType *AMREX_RESTRICT | m_x = nullptr |
const RType *AMREX_RESTRICT | m_z = nullptr |
const RType * | m_theta = nullptr |
Functor that can be used to extract the positions of the macroparticles inside a ParallelFor kernel.
T_PIdx | particle index enumerator |
using GetParticlePosition< T_PIdx >::RType = amrex::ParticleReal |
|
default |
|
inlinenoexcept |
Constructor
ptiType | the type of the particle iterator used in the constructor |
a_pti | iterator to the tile containing the macroparticles |
a_offset | offset to apply to the particle indices |
|
inlinenoexcept |
Extract the position coordinates of the particle as stored located at index i + a_offset
and store them in the variables x
, y
, z
This is only different for RZ since this returns (r, theta, z) in that case.
|
inlinenoexcept |
Extract the cartesian position coordinates of the particle located at index i + a_offset
and store them in the variables x
, y
, z
const RType* GetParticlePosition< T_PIdx >::m_theta = nullptr |
const RType* AMREX_RESTRICT GetParticlePosition< T_PIdx >::m_x = nullptr |
const RType* AMREX_RESTRICT GetParticlePosition< T_PIdx >::m_z = nullptr |