|
|
using | Base = detail::ParticleLayout< T, Dim, PositionProperties... > |
| |
|
using | hash_type = detail::hash_type< position_memory_space > |
| |
|
using | locate_type = typename detail::ViewType< int, 1, position_memory_space >::view_type |
| |
|
using | bool_type = typename detail::ViewType< bool, 1, position_memory_space >::view_type |
| |
|
using | vector_type = typename Base::vector_type |
| |
|
using | RegionLayout_t = typename detail::RegionLayout< T, Dim, Mesh, position_memory_space >::uniform_type |
| |
|
using | FieldLayout_t = typename ippl::FieldLayout< Dim > |
| |
|
using | size_type = detail::size_type |
| |
Public Types inherited from ippl::detail::ParticleLayout< T, Dim, PositionProperties... > |
|
typedef T | value_type |
| |
|
typedef std::int64_t | index_type |
| |
|
typedef Vector< T, Dim > | vector_type |
| |
|
using | particle_position_type = ParticleAttrib< vector_type, PositionProperties... > |
| |
|
using | position_memory_space = typename particle_position_type::memory_space |
| |
|
using | position_execution_space = typename particle_position_type::execution_space |
| |
|
typedef std::array< BC, 2 *Dim > | bc_container_type |
| |
|
|
| ParticleSpatialLayout (FieldLayout< Dim > &, Mesh &, bool fem=false) |
| |
|
void | updateLayout (FieldLayout< Dim > &, Mesh &) |
| |
|
template<class ParticleContainer > |
| void | update (ParticleContainer &pc) |
| |
|
const RegionLayout_t & | getRegionLayout () const |
| |
| template<typename ParticleContainer > |
| std::pair< size_type, size_type > | locateParticles (const ParticleContainer &pc, locate_type &ranks, bool_type &invalid, locate_type &nSends_dview, locate_type &sends_dview) const |
| |
| void | fillHash (int rank, const locate_type &ranks, hash_type &hash) |
| |
| size_t | numberOfSends (int rank, const locate_type &ranks) |
| |
|
template<size_t... Idx> |
| KOKKOS_INLINE_FUNCTION constexpr bool | positionInRegion (const std::index_sequence< Idx... > &, const vector_type &pos, const region_type ®ion) |
| |
| template<typename ParticleContainer > |
| std::pair< detail::size_type, detail::size_type > | locateParticles (const ParticleContainer &pc, locate_type &ranks, bool_type &invalid, locate_type &nSends_dview, locate_type &sends_dview) const |
| | This function determines to which rank particles need to be sent after the iteration step. It starts by first scanning direct rank neighbors, and only does a global scan if there are still unfound particles. It then calculates how many particles need to be sent to each rank and how many ranks are sent to in total.
|
| |
Public Member Functions inherited from ippl::detail::ParticleLayout< T, Dim, PositionProperties... > |
|
void | update (PBase &) |
| |
| void | setParticleBC (bc_container_type bcs) |
| |
| void | setParticleBC (BC bc) |
| |
| const bc_container_type & | getParticleBC () const |
| |
| void | applyBC (const particle_position_type &R, const NDRegion< T, Dim > &nr) |
| |
template<typename T, unsigned Dim, class
Mesh = UniformCartesian<T, Dim>, typename... PositionProperties>
class ippl::ParticleSpatialLayout< T, Dim, Mesh, PositionProperties >
ParticleSpatialLayout class definition.
- Template Parameters
-
| T | value type |
| Dim | dimension |
| Mesh | type |
template<typename T , unsigned Dim, class
Mesh = UniformCartesian<T, Dim>, typename... PositionProperties>
template<typename ParticleContainer >
| std::pair< detail::size_type, detail::size_type > ippl::ParticleSpatialLayout< T, Dim, Mesh, PositionProperties >::locateParticles |
( |
const ParticleContainer & |
pc, |
|
|
locate_type & |
ranks, |
|
|
bool_type & |
invalid, |
|
|
locate_type & |
nSends_dview, |
|
|
locate_type & |
sends_dview |
|
) |
| const |
This function determines to which rank particles need to be sent after the iteration step. It starts by first scanning direct rank neighbors, and only does a global scan if there are still unfound particles. It then calculates how many particles need to be sent to each rank and how many ranks are sent to in total.
- Parameters
-
| pc | Particle Container |
| ranks | A vector the length of the number of particles on the current rank, where each value refers to the new rank of the particle |
| invalid | A vector marking the particles that need to be sent away, and thus locally deleted |
| nSends_dview | Device view the length of number of ranks, where each value determines the number of particles sent to that rank from the current rank |
| sends_dview | Device view for the number of ranks that are sent to from current rank |
- Returns
- tuple with the number of particles sent away and the number of ranks sent to
outsideIds: Container of particle IDs that travelled outside of the neighborhood.
outsideCount: Tracks the number of particles that travelled outside of the neighborhood.
invalidCount: Tracks the number of particles that need to be sent to other ranks.
neighborSize: Size of a neighborhood in D dimentions.
neighbors_view: Kokkos view with the IDs of the neighboring MPI ranks.
Begin Kokkos loop: Step 1: search in current rank Step 2: search in neighbors Step 3: save information on whether the particle was located Step 4: run additional loop on non-located particles
Step 2
Step 3
Step 4
pID: (local) ID of the particle that is currently being searched.
inRegion: Checks whether particle pID is inside region j.