Hipace
Public Types | Public Member Functions | Public Attributes | List of all members
EnforceBCandSetPos< T_ParTile > Struct Template Reference

Functor that can be used to apply the boundary conditions to the macroparticles inside a ParallelFor kernel. More...

#include <GetAndSetPosition.H>

Public Types

using RType = amrex::ParticleReal
 
using PTDType = typename T_ParTile::ParticleTileDataType
 

Public Member Functions

 EnforceBCandSetPos (const amrex::Geometry &geom) noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool operator() (const PTDType &ptd, const int ip, RType &x, RType &y) const noexcept
 set position and enforces the boundary condition to the plasma particle at index ip and returns if the particle is invalid More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool operator() (const PTDType &ptd, const int ip, RType &x, RType &y, RType &z) const noexcept
 set position and enforces the boundary condition to the beam particle More...
 

Public Attributes

amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > m_plo
 
amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > m_phi
 
int m_is_per
 

Detailed Description

template<class T_ParTile>
struct EnforceBCandSetPos< T_ParTile >

Functor that can be used to apply the boundary conditions to the macroparticles inside a ParallelFor kernel.

Member Typedef Documentation

◆ PTDType

template<class T_ParTile >
using EnforceBCandSetPos< T_ParTile >::PTDType = typename T_ParTile::ParticleTileDataType

◆ RType

template<class T_ParTile >
using EnforceBCandSetPos< T_ParTile >::RType = amrex::ParticleReal

Constructor & Destructor Documentation

◆ EnforceBCandSetPos()

template<class T_ParTile >
EnforceBCandSetPos< T_ParTile >::EnforceBCandSetPos ( const amrex::Geometry geom)
inlinenoexcept

Constructor.

Parameters
geomgeometry used for domain size and periodicity

Member Function Documentation

◆ operator()() [1/2]

template<class T_ParTile >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool EnforceBCandSetPos< T_ParTile >::operator() ( const PTDType ptd,
const int  ip,
RType x,
RType y 
) const
inlinenoexcept

set position and enforces the boundary condition to the plasma particle at index ip and returns if the particle is invalid

Parameters
[in]ptdParticleTileData
[in]ipindex of the particle
[in]xnew x position of particle
[in]ynew x position of particle

◆ operator()() [2/2]

template<class T_ParTile >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool EnforceBCandSetPos< T_ParTile >::operator() ( const PTDType ptd,
const int  ip,
RType x,
RType y,
RType z 
) const
inlinenoexcept

set position and enforces the boundary condition to the beam particle

Parameters
[in]ptdParticleTileData
[in]ipindex of the particle
[in]xnew x position of particle
[in]ynew x position of particle
[in]znew x position of particle

Member Data Documentation

◆ m_is_per

template<class T_ParTile >
int EnforceBCandSetPos< T_ParTile >::m_is_per

◆ m_phi

template<class T_ParTile >
amrex::GpuArray<amrex::Real,AMREX_SPACEDIM> EnforceBCandSetPos< T_ParTile >::m_phi

◆ m_plo

template<class T_ParTile >
amrex::GpuArray<amrex::Real,AMREX_SPACEDIM> EnforceBCandSetPos< T_ParTile >::m_plo

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