Block-Structured AMR Software Framework
Loading...
Searching...
No Matches
amrex::Particle< T_NReal, T_NInt > Struct Template Reference

The struct used to store particles. More...

#include <AMReX_Particle.H>

Inheritance diagram for amrex::Particle< T_NReal, T_NInt >:
amrex::ParticleBase< ParticleReal, T_NReal, 0 >

Public Types

using StorageParticleType = Particle
using ConstType = Particle const
using RealType = ParticleReal
 The floating point type used for the particles.
using IntType = int

Public Member Functions

__host__ __device__ ParticleCPUWrapper cpu () &
__host__ __device__ ParticleIDWrapper id () &
__host__ __device__ ConstParticleCPUWrapper cpu () const &
__host__ __device__ ConstParticleIDWrapper id () const &
__host__ __device__ void atomicSetID (const Long id)
__host__ __device__ uint64_t & idcpu () &
__host__ __device__ const uint64_t & idcpu () const &
__host__ __device__ RealVect pos () const &
__host__ __device__ RealType & pos (int index) &
__host__ __device__ RealType pos (int index) const &
__host__ __device__ RealType & rdata (int index) &
__host__ __device__ RealType & rdata (int) &
__host__ __device__ const RealType & rdata (int index) const &
__host__ __device__ RealType rdata (int) const &
__host__ __device__ RealType rdata (int) &&=delete
__host__ __device__ RealVect rvec (int indx, int indy, int indz) const &
__host__ __device__ RealVect rvec (int, int, int) const &
__host__ __device__ RealVect rvec (const IntVect &indices) const &
__host__ __device__ RealVect rvec (const IntVect &) const &
__host__ __device__ int & idata (int index) &
__host__ __device__ uint64_t & idata (int) &
__host__ __device__ const int & idata (int index) const &
__host__ __device__ int idata (int) const &
__host__ __device__ RealType idata (int) &&=delete

Static Public Member Functions

static Long NextID ()
 Returns the next particle ID for this processor. Particle IDs start at 1 and are never reused. The pair, consisting of the ID and the CPU on which the particle is "born", is a globally unique identifier for a particle. The maximum of this value across all processors must be checkpointed and then restored on restart so that we don't reuse particle IDs.
static Long UnprotectedNextID ()
 This version can only be used inside omp critical.
static void NextID (Long nextid)
 Reset on restart.

Static Public Attributes

static constexpr bool is_soa_particle = false
static constexpr bool is_rtsoa_particle = false
static constexpr int NReal = T_NReal
 number of extra Real components in the particle struct
static constexpr int NInt = T_NInt
 number of extra integer components in the particle struct
static Long the_next_id

Additional Inherited Members

Public Attributes inherited from amrex::ParticleBase< ParticleReal, T_NReal, 0 >
ParticleReal m_pos [3]
ParticleReal m_rdata [NReal]
uint64_t m_idcpu
int m_idata [NInt]

Detailed Description

template<int T_NReal, int T_NInt = 0>
struct amrex::Particle< T_NReal, T_NInt >

The struct used to store particles.

Template Parameters
T_NRealThe number of extra Real components
T_NIntThe number of extra integer components

Member Typedef Documentation

◆ ConstType

template<int T_NReal, int T_NInt = 0>
using amrex::Particle< T_NReal, T_NInt >::ConstType = Particle const

◆ IntType

template<int T_NReal, int T_NInt = 0>
using amrex::Particle< T_NReal, T_NInt >::IntType = int

◆ RealType

template<int T_NReal, int T_NInt = 0>
using amrex::Particle< T_NReal, T_NInt >::RealType = ParticleReal

The floating point type used for the particles.

◆ StorageParticleType

template<int T_NReal, int T_NInt = 0>
using amrex::Particle< T_NReal, T_NInt >::StorageParticleType = Particle

Member Function Documentation

◆ atomicSetID()

template<int T_NReal, int T_NInt = 0>
__host__ __device__ void amrex::Particle< T_NReal, T_NInt >::atomicSetID ( const Long id)
inline

◆ cpu() [1/2]

template<int T_NReal, int T_NInt = 0>
__host__ __device__ ParticleCPUWrapper amrex::Particle< T_NReal, T_NInt >::cpu ( ) &
inlinenodiscard

◆ cpu() [2/2]

template<int T_NReal, int T_NInt = 0>
__host__ __device__ ConstParticleCPUWrapper amrex::Particle< T_NReal, T_NInt >::cpu ( ) const &
inlinenodiscard

◆ id() [1/2]

template<int T_NReal, int T_NInt = 0>
__host__ __device__ ParticleIDWrapper amrex::Particle< T_NReal, T_NInt >::id ( ) &
inlinenodiscard

◆ id() [2/2]

template<int T_NReal, int T_NInt = 0>
__host__ __device__ ConstParticleIDWrapper amrex::Particle< T_NReal, T_NInt >::id ( ) const &
inlinenodiscard

◆ idata() [1/5]

template<int T_NReal, int T_NInt = 0>
__host__ __device__ int & amrex::Particle< T_NReal, T_NInt >::idata ( int index) &
inlinenodiscard

◆ idata() [2/5]

template<int T_NReal, int T_NInt = 0>
__host__ __device__ const int & amrex::Particle< T_NReal, T_NInt >::idata ( int index) const &
inlinenodiscard

◆ idata() [3/5]

template<int T_NReal, int T_NInt = 0>
__host__ __device__ uint64_t & amrex::Particle< T_NReal, T_NInt >::idata ( int ) &
inline

◆ idata() [4/5]

template<int T_NReal, int T_NInt = 0>
__host__ __device__ RealType amrex::Particle< T_NReal, T_NInt >::idata ( int ) &&
inlinedelete

◆ idata() [5/5]

template<int T_NReal, int T_NInt = 0>
__host__ __device__ int amrex::Particle< T_NReal, T_NInt >::idata ( int ) const &
inlinenodiscard

◆ idcpu() [1/2]

template<int T_NReal, int T_NInt = 0>
__host__ __device__ uint64_t & amrex::Particle< T_NReal, T_NInt >::idcpu ( ) &
inlinenodiscard

◆ idcpu() [2/2]

template<int T_NReal, int T_NInt = 0>
__host__ __device__ const uint64_t & amrex::Particle< T_NReal, T_NInt >::idcpu ( ) const &
inlinenodiscard

◆ NextID() [1/2]

template<int NReal, int NInt>
Long amrex::Particle< NReal, NInt >::NextID ( )
staticnodiscard

Returns the next particle ID for this processor. Particle IDs start at 1 and are never reused. The pair, consisting of the ID and the CPU on which the particle is "born", is a globally unique identifier for a particle. The maximum of this value across all processors must be checkpointed and then restored on restart so that we don't reuse particle IDs.

◆ NextID() [2/2]

template<int NReal, int NInt>
void amrex::Particle< NReal, NInt >::NextID ( Long nextid)
static

Reset on restart.

Parameters
nextid

◆ pos() [1/3]

template<int T_NReal, int T_NInt = 0>
__host__ __device__ RealVect amrex::Particle< T_NReal, T_NInt >::pos ( ) const &
inlinenodiscard

◆ pos() [2/3]

template<int T_NReal, int T_NInt = 0>
__host__ __device__ RealType & amrex::Particle< T_NReal, T_NInt >::pos ( int index) &
inlinenodiscard

◆ pos() [3/3]

template<int T_NReal, int T_NInt = 0>
__host__ __device__ RealType amrex::Particle< T_NReal, T_NInt >::pos ( int index) const &
inlinenodiscard

◆ rdata() [1/5]

template<int T_NReal, int T_NInt = 0>
__host__ __device__ RealType & amrex::Particle< T_NReal, T_NInt >::rdata ( int index) &
inlinenodiscard

◆ rdata() [2/5]

template<int T_NReal, int T_NInt = 0>
__host__ __device__ const RealType & amrex::Particle< T_NReal, T_NInt >::rdata ( int index) const &
inlinenodiscard

◆ rdata() [3/5]

template<int T_NReal, int T_NInt = 0>
__host__ __device__ RealType & amrex::Particle< T_NReal, T_NInt >::rdata ( int ) &
inlinenodiscard

◆ rdata() [4/5]

template<int T_NReal, int T_NInt = 0>
__host__ __device__ RealType amrex::Particle< T_NReal, T_NInt >::rdata ( int ) &&
inlinedelete

◆ rdata() [5/5]

template<int T_NReal, int T_NInt = 0>
__host__ __device__ RealType amrex::Particle< T_NReal, T_NInt >::rdata ( int ) const &
inlinenodiscard

◆ rvec() [1/4]

template<int T_NReal, int T_NInt = 0>
__host__ __device__ RealVect amrex::Particle< T_NReal, T_NInt >::rvec ( const IntVect & ) const &
inlinenodiscard

◆ rvec() [2/4]

template<int T_NReal, int T_NInt = 0>
__host__ __device__ RealVect amrex::Particle< T_NReal, T_NInt >::rvec ( const IntVect & indices) const &
inlinenodiscard

◆ rvec() [3/4]

template<int T_NReal, int T_NInt = 0>
__host__ __device__ RealVect amrex::Particle< T_NReal, T_NInt >::rvec ( int indx,
int indy,
int indz ) const &
inlinenodiscard

◆ rvec() [4/4]

template<int T_NReal, int T_NInt = 0>
__host__ __device__ RealVect amrex::Particle< T_NReal, T_NInt >::rvec ( int ,
int ,
int  ) const &
inlinenodiscard

◆ UnprotectedNextID()

template<int NReal, int NInt>
Long amrex::Particle< NReal, NInt >::UnprotectedNextID ( )
staticnodiscard

This version can only be used inside omp critical.

Member Data Documentation

◆ is_rtsoa_particle

template<int T_NReal, int T_NInt = 0>
bool amrex::Particle< T_NReal, T_NInt >::is_rtsoa_particle = false
staticconstexpr

◆ is_soa_particle

template<int T_NReal, int T_NInt = 0>
bool amrex::Particle< T_NReal, T_NInt >::is_soa_particle = false
staticconstexpr

◆ NInt

template<int T_NReal, int T_NInt = 0>
int amrex::Particle< T_NReal, T_NInt >::NInt = T_NInt
staticconstexpr

number of extra integer components in the particle struct

◆ NReal

template<int T_NReal, int T_NInt = 0>
int amrex::Particle< T_NReal, T_NInt >::NReal = T_NReal
staticconstexpr

number of extra Real components in the particle struct

◆ the_next_id

template<int T_NReal, int T_NInt = 0>
Long amrex::Particle< T_NReal, T_NInt >::the_next_id
static

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