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>) {
222 template <
typename MemorySpace =
void,
typename Functor>
224 if constexpr (std::is_void_v<MemorySpace>) {
225 attributes_m.forAll([&]<
typename Attributes>(Attributes& atts) {
226 for (
auto& attribute : atts) {
276 template <
typename... Properties>
277 void destroy(
const Kokkos::View<bool*, Properties...>& invalid,
const size_type destroyNum);
289 template <
typename... Properties>
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>
KOKKOS_INLINE_FUNCTION auto & get(Tuple< Ts... > &t)
Accessor function to get an element mutable reference at a specific index from a Tuple.
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
void pack(const hash_container_type &hash)
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
void setParticleBC(BC bc)
void internalDestroy(const Kokkos::View< bool *, Properties... > &invalid, const size_type destroyNum)
ParticleAttrib< index_type, IDProperties... > particle_index_type
detail::size_type size_type
size_type getTotalNum() const
void globalCreate(size_type nTotal)
ParticleBase(Layout_t &layout)
void forAllAttributes(Functor &&f) const
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)
hash_container_type keepIndex_m
void sendToRank(int rank, int tag, std::vector< MPI_Request > &requests, const HashType &hash)
hash_container_type deleteIndex_m
typename PLayout::particle_position_type particle_position_type
typename detail::ContainerForAllSpaces< container_type >::type attribute_container_type
void deserialize(Archive &ar, size_type nrecvs)
size_type getLocalNum() const
typename TypeForAllSpaces< container_type >::memory_spaces_type type