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

Functor that can be used to modify 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

template<typename ptiType >
 SetParticlePosition (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
 Set the position of the particle at index i + a_offset to x, y, z More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void AsStored (const int i, RType x, RType y, RType z) const noexcept
 Set the position of the particle at index i + a_offset to x, y, z This is only different for RZ since the input should be (r, theta, z) in that case. More...
 

Public Attributes

PType *AMREX_RESTRICT m_structs
 
RType *AMREX_RESTRICT m_theta
 

Detailed Description

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

Parameters
a_ptiiterator to the tile being modified
a_offsetoffset to apply to the particle indices

Member Typedef Documentation

◆ PType

◆ RType

using SetParticlePosition::RType = amrex::ParticleReal

Constructor & Destructor Documentation

◆ SetParticlePosition()

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

Member Function Documentation

◆ AsStored()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void SetParticlePosition::AsStored ( const int  i,
RType  x,
RType  y,
RType  z 
) const
inlinenoexcept

Set the position of the particle at index i + a_offset to x, y, z This is only different for RZ since the input should be (r, theta, z) in that case.

◆ operator()()

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

Set the position of the particle at index i + a_offset to x, y, z

Member Data Documentation

◆ m_structs

PType* AMREX_RESTRICT SetParticlePosition::m_structs

◆ m_theta

RType* AMREX_RESTRICT SetParticlePosition::m_theta

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