WarpX
Loading...
Searching...
No Matches
SetParticlePosition< T_PIdx > Struct Template Reference

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

#include <GetAndSetPosition.H>

Public Types

using RType = amrex::ParticleReal
 

Public Member Functions

template<typename ptiType>
 SetParticlePosition (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
 Set the position of the particle at index i + a_offset to x, y, z
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void AsStored (const long 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.
 

Public Attributes

RType *AMREX_RESTRICT m_x
 
RType *AMREX_RESTRICT m_z
 
RType *AMREX_RESTRICT m_theta
 

Detailed Description

template<typename T_PIdx = PIdx>
struct SetParticlePosition< T_PIdx >

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

Template Parameters
T_PIdxparticle index enumerator
Parameters
a_ptiiterator to the tile being modified
a_offsetoffset to apply to the particle indices

Member Typedef Documentation

◆ RType

template<typename T_PIdx = PIdx>
using SetParticlePosition< T_PIdx >::RType = amrex::ParticleReal

Constructor & Destructor Documentation

◆ SetParticlePosition()

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

Member Function Documentation

◆ AsStored()

template<typename T_PIdx = PIdx>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void SetParticlePosition< T_PIdx >::AsStored ( const long 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()()

template<typename T_PIdx = PIdx>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void SetParticlePosition< T_PIdx >::operator() ( const long 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_theta

template<typename T_PIdx = PIdx>
RType* AMREX_RESTRICT SetParticlePosition< T_PIdx >::m_theta

◆ m_x

template<typename T_PIdx = PIdx>
RType* AMREX_RESTRICT SetParticlePosition< T_PIdx >::m_x

◆ m_z

template<typename T_PIdx = PIdx>
RType* AMREX_RESTRICT SetParticlePosition< T_PIdx >::m_z

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