51#ifndef IPPL_PARTICLE_BASE_H
52#define IPPL_PARTICLE_BASE_H
86 template <
class PLayout,
typename... IDProperties>
88 constexpr static bool EnableIDs =
sizeof...(IDProperties) > 0;
98 template <
typename... Properties>
101 template <
typename MemorySpace>
190 template <
typename MemorySpace>
198 template <
typename MemorySpace = Kokkos::DefaultExecutionSpace::memory_space>
210 template <
typename MemorySpace =
void,
typename Functor>
212 if constexpr (std::is_void_v<MemorySpace>) {
215 for (
auto& attribute :
attributes_m.template get<MemorySpace>()) {
222 template <
typename MemorySpace =
void,
typename Functor>
224 if constexpr (std::is_void_v<MemorySpace>) {
226 for (
auto& attribute : atts) {
231 for (
auto& attribute :
attributes_m.template get<MemorySpace>()) {
243 total +=
attributes_m.template get<MemorySpace>().size();
276 template <
typename... Properties>
277 void destroy(
const Kokkos::View<bool*, Properties...>& invalid,
const size_type destroyNum);
289 template <
typename... Properties>
290 void internalDestroy(
const Kokkos::View<bool*, Properties...>& invalid,
303 template <
typename HashType>
304 void sendToRank(
int rank,
int tag, std::vector<MPI_Request>& requests,
305 const HashType& hash);
320 template <
typename Archive>
327 template <
typename Archive>
336 template <
typename MemorySpace>
ippl::detail::size_type size_type
A collection of routines to construct object Attributes and retrieve.
Implementations for FFT constructor/destructor and transforms.
void runForAllSpaces(Functor &&f)
virtual ~ParticleBaseBase()=default
std::vector< attribute_type< MemorySpace > * > container_type
void create(size_type nLocal)
void setParticleBC(const bc_container_type &bcs)
void addAttribute(detail::ParticleAttribBase< MemorySpace > &pa)
typename detail::ContainerForAllSpaces< detail::hash_type >::type hash_container_type
index_type nextID_m
next unique particle ID
void pack(const hash_container_type &hash)
size_type localNum_m
processor local number of particles
typename detail::ParticleAttribBase< Properties... > attribute_type
const Layout_t & getLayout() const
void serialize(Archive &ar, size_type nsends)
typename PLayout::vector_type vector_type
void forAllAttributes(Functor &&f)
attribute_container_type attributes_m
all attributes
void setParticleBC(BC bc)
void internalDestroy(const Kokkos::View< bool *, Properties... > &invalid, const size_type destroyNum)
detail::size_type size_type
size_type getTotalNum() const
void globalCreate(size_type nTotal)
void forAllAttributes(Functor &&f) const
Layout_t * layout_m
particle layout
void initialize(Layout_t &layout)
void unpack(size_type nrecvs)
void destroy(const Kokkos::View< bool *, Properties... > &invalid, const size_type destroyNum)
size_type packedSize(const size_type count) const
static constexpr bool EnableIDs
unsigned getAttributeNum() const
void recvFromRank(int rank, int tag, size_type nRecvs)
void createWithID(index_type id)
typename PLayout::index_type index_type
void setLocalNum(size_type size)
typename PLayout::bc_container_type bc_container_type
attribute_type< MemorySpace > * getAttribute(size_t i)
index_type numNodes_m
number of MPI ranks
hash_container_type keepIndex_m
void sendToRank(int rank, int tag, std::vector< MPI_Request > &requests, const HashType &hash)
size_type totalNum_m
total number of particles (across all processes)
hash_container_type deleteIndex_m
buffers for particle partitioning
typename PLayout::particle_position_type particle_position_type
typename detail::ContainerForAllSpaces< container_type >::type attribute_container_type
particle_position_type R
view of particle positions
particle_index_type ID
view of particle IDs
void deserialize(Archive &ar, size_type nrecvs)
size_type getLocalNum() const
typename TypeForAllSpaces< container_type >::memory_spaces_type type