ARTEMIS
Public Types | Public Member Functions | Public Attributes | List of all members
GetParticlePosition Struct Reference

Functor that can be used to extract the positions of the macroparticles inside a ParallelFor kernel. More...

#include <GetAndSetPosition.H>

Public Types

using PType = WarpXParticleContainer::ParticleType
 
using RType = amrex::ParticleReal
 

Public Member Functions

 GetParticlePosition ()=default
 
template<typename ptiType >
 GetParticlePosition (const ptiType &a_pti, int a_offset=0) noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void operator() (const int 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 int 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 PType *AMREX_RESTRICT m_structs = nullptr
 
const RTypem_theta = nullptr
 

Detailed Description

Functor that can be used to extract the positions of the macroparticles inside a ParallelFor kernel.

Member Typedef Documentation

◆ PType

◆ RType

using GetParticlePosition::RType = amrex::ParticleReal

Constructor & Destructor Documentation

◆ GetParticlePosition() [1/2]

GetParticlePosition::GetParticlePosition ( )
default

◆ GetParticlePosition() [2/2]

template<typename ptiType >
GetParticlePosition::GetParticlePosition ( const ptiType &  a_pti,
int  a_offset = 0 
)
inlinenoexcept

Constructor

Template Parameters
ptiTypethe type of the particle iterator used in the constructor
Parameters
a_ptiiterator to the tile containing the macroparticles
a_offsetoffset to apply to the particle indices

Member Function Documentation

◆ AsStored()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void GetParticlePosition::AsStored ( const int  i,
RType x,
RType y,
RType z 
) const
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.

◆ operator()()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void GetParticlePosition::operator() ( const int  i,
RType x,
RType y,
RType z 
) const
inlinenoexcept

Extract the cartesian position coordinates of the particle located at index i + a_offset and store them in the variables x, y, z

Member Data Documentation

◆ m_structs

const PType* AMREX_RESTRICT GetParticlePosition::m_structs = nullptr

◆ m_theta

const RType* GetParticlePosition::m_theta = nullptr

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