Block-Structured AMR Software Framework
 
Loading...
Searching...
No Matches
amrex::ParticleIDWrapper< T > Struct Template Reference

#include <AMReX_Particle.H>

Public Member Functions

 ~ParticleIDWrapper () noexcept=default
 
__host__ __device__ ParticleIDWrapper (T &idata) noexcept
 
__host__ __device__ ParticleIDWrapper (const ParticleIDWrapper &rhs)=default
 
 ParticleIDWrapper (ParticleIDWrapper &&)=delete
 
__host__ __device__ ParticleIDWrapperoperator= (const ParticleIDWrapper &pidw) noexcept
 
__host__ __device__ ParticleIDWrapperoperator= (ParticleIDWrapper &&pidw) noexcept
 
__host__ __device__ ParticleIDWrapperoperator= (const Long id) noexcept
 
__host__ __device__ operator Long () const noexcept
 
__host__ __device__ void make_invalid () const noexcept
 
template<typename T_Bool >
__host__ __device__ void make_invalid (T_Bool const &mask) const noexcept
 
__host__ __device__ void make_valid () const noexcept
 
template<typename T_Bool >
__host__ __device__ void make_valid (T_Bool const &mask) const noexcept
 
__host__ __device__ bool is_valid () const noexcept
 

Public Attributes

T * m_idata
 

Constructor & Destructor Documentation

◆ ~ParticleIDWrapper()

template<typename T = uint64_t>
amrex::ParticleIDWrapper< T >::~ParticleIDWrapper ( )
defaultnoexcept

◆ ParticleIDWrapper() [1/3]

template<typename T = uint64_t>
__host__ __device__ amrex::ParticleIDWrapper< T >::ParticleIDWrapper ( T &  idata)
inlinenoexcept

◆ ParticleIDWrapper() [2/3]

template<typename T = uint64_t>
__host__ __device__ amrex::ParticleIDWrapper< T >::ParticleIDWrapper ( const ParticleIDWrapper< T > &  rhs)
inlinedefault

◆ ParticleIDWrapper() [3/3]

template<typename T = uint64_t>
amrex::ParticleIDWrapper< T >::ParticleIDWrapper ( ParticleIDWrapper< T > &&  )
delete

Member Function Documentation

◆ is_valid()

template<typename T = uint64_t>
__host__ __device__ bool amrex::ParticleIDWrapper< T >::is_valid ( ) const
inlinenoexcept

Check the particle is valid, via the sign of the id.

Returns true if the particle is valid (the id is positive), otherwise false (invalid particle).

◆ make_invalid() [1/2]

template<typename T = uint64_t>
__host__ __device__ void amrex::ParticleIDWrapper< T >::make_invalid ( ) const
inlinenoexcept

Mark the particle as invalid

Swaps the is_valid (sign) bit to invalid. This is NOT identical to id = -id, but it is equally reversible via make_valid().

◆ make_invalid() [2/2]

template<typename T = uint64_t>
template<typename T_Bool >
__host__ __device__ void amrex::ParticleIDWrapper< T >::make_invalid ( T_Bool const &  mask) const
inlinenoexcept

Mark the particle as invalid

Swaps the is_valid (sign) bit to invalid. This is NOT identical to id = -id, but it is equally reversible via make_valid().

◆ make_valid() [1/2]

template<typename T = uint64_t>
__host__ __device__ void amrex::ParticleIDWrapper< T >::make_valid ( ) const
inlinenoexcept

Mark the particle as valid

Swaps the is_valid (sign) bit to valid. This is NOT identical to id = -id, but it is equally reversible via make_invalid().

◆ make_valid() [2/2]

template<typename T = uint64_t>
template<typename T_Bool >
__host__ __device__ void amrex::ParticleIDWrapper< T >::make_valid ( T_Bool const &  mask) const
inlinenoexcept

Mark the particle as valid

Swaps the is_valid (sign) bit to valid. This is NOT identical to id = -id, but it is equally reversible via make_invalid().

◆ operator Long()

template<typename T = uint64_t>
__host__ __device__ amrex::ParticleIDWrapper< T >::operator Long ( ) const
inlinenoexcept

◆ operator=() [1/3]

template<typename T = uint64_t>
__host__ __device__ ParticleIDWrapper & amrex::ParticleIDWrapper< T >::operator= ( const Long  id)
inlinenoexcept

◆ operator=() [2/3]

template<typename T = uint64_t>
__host__ __device__ ParticleIDWrapper & amrex::ParticleIDWrapper< T >::operator= ( const ParticleIDWrapper< T > &  pidw)
inlinenoexcept

◆ operator=() [3/3]

template<typename T = uint64_t>
__host__ __device__ ParticleIDWrapper & amrex::ParticleIDWrapper< T >::operator= ( ParticleIDWrapper< T > &&  pidw)
inlinenoexcept

Member Data Documentation

◆ m_idata

template<typename T = uint64_t>
T* amrex::ParticleIDWrapper< T >::m_idata

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