Multi-node particle redistribution using the grid halo. More...
#include <Cabana_DeepCopy.hpp>
#include <Cabana_Distributor.hpp>
#include <Cabana_Grid_GlobalGrid.hpp>
#include <Cabana_Grid_GlobalMesh.hpp>
#include <Cabana_Grid_LocalGrid.hpp>
#include <Cabana_Grid_LocalMesh.hpp>
#include <Kokkos_Core.hpp>
#include <vector>
Go to the source code of this file.
Namespaces | |
namespace | Cabana |
Core: particle data structures and algorithms. | |
Functions | |
template<class LocalGridType, std::size_t NSD = LocalGridType::num_space_dim> | |
std::enable_if_t< 3==NSD, std::vector< int > > | Cabana::Grid::getTopology (const LocalGridType &local_grid) |
Build neighbor topology of 27 nearest 3D neighbors. Some of the ranks in this list may be invalid. | |
template<class LocalGridType, std::size_t NSD = LocalGridType::num_space_dim> | |
std::enable_if_t< 2==NSD, std::vector< int > > | Cabana::Grid::getTopology (const LocalGridType &local_grid) |
Build neighbor topology of 8 nearest 2D neighbors. Some of the ranks in this list may be invalid. | |
template<class LocalGridType, class PositionSliceType> | |
int | Cabana::Grid::migrateCount (const LocalGridType &local_grid, const PositionSliceType &positions, const int minimum_halo_width) |
Check for the number of particles that must be communicated. | |
template<class LocalGridType, class PositionSliceType> | |
Cabana::Distributor< typename PositionSliceType::memory_space > | Cabana::Grid::createParticleDistributor (const LocalGridType &local_grid, PositionSliceType &positions) |
Determine which data should be migrated from one uniquely-owned decomposition to another uniquely-owned decomposition, using bounds of the grid and taking periodic boundaries into account. | |
template<class LocalGridType, class ParticlePositions, class ParticleContainer> | |
bool | Cabana::Grid::particleMigrate (const LocalGridType &local_grid, const ParticlePositions &positions, ParticleContainer &particles, const int min_halo_width, const bool force_migrate=false) |
Migrate data from one uniquely-owned decomposition to another uniquely-owned decomposition, using the bounds and periodic boundaries of the grid to determine which particles should be moved. In-place variant. | |
template<class LocalGridType, class ParticlePositions, class ParticleContainer> | |
bool | Cabana::Grid::particleMigrate (const LocalGridType &local_grid, const ParticlePositions &positions, const ParticleContainer &src_particles, ParticleContainer &dst_particles, const int min_halo_width, const bool force_migrate=false) |
Migrate data from one uniquely-owned decomposition to another uniquely-owned decomposition, using the bounds and periodic boundaries of the grid to determine which particles should be moved. Separate AoSoA variant. | |
Multi-node particle redistribution using the grid halo.
Cabana::Distributor< typename PositionSliceType::memory_space > Cabana::Grid::createParticleDistributor | ( | const LocalGridType & | local_grid, |
PositionSliceType & | positions ) |
Determine which data should be migrated from one uniquely-owned decomposition to another uniquely-owned decomposition, using bounds of the grid and taking periodic boundaries into account.
LocalGridType | LocalGrid type. |
PositionSliceType | Position type. |
local_grid | The local grid containing periodicity and system bound information. |
positions | The particle positions. |
std::enable_if_t< 3==NSD, std::vector< int > > Cabana::Grid::getTopology | ( | const LocalGridType & | local_grid | ) |
Build neighbor topology of 27 nearest 3D neighbors. Some of the ranks in this list may be invalid.
local_grid | Local grid from which MPI neighbors will be extracted. |
std::enable_if_t< 2==NSD, std::vector< int > > Cabana::Grid::getTopology | ( | const LocalGridType & | local_grid | ) |
Build neighbor topology of 8 nearest 2D neighbors. Some of the ranks in this list may be invalid.
local_grid | Local grid from which MPI neighbors will be extracted. |
int Cabana::Grid::migrateCount | ( | const LocalGridType & | local_grid, |
const PositionSliceType & | positions, | ||
const int | minimum_halo_width ) |
Check for the number of particles that must be communicated.
LocalGridType | LocalGrid type. |
PositionSliceType | Particle position type. |
local_grid | The local grid containing periodicity and system bound information. |
positions | The particle position container, either Slice or View. |
minimum_halo_width | Number of halo mesh widths to include for ghosting. |
bool Cabana::Grid::particleMigrate | ( | const LocalGridType & | local_grid, |
const ParticlePositions & | positions, | ||
const ParticleContainer & | src_particles, | ||
ParticleContainer & | dst_particles, | ||
const int | min_halo_width, | ||
const bool | force_migrate = false ) |
Migrate data from one uniquely-owned decomposition to another uniquely-owned decomposition, using the bounds and periodic boundaries of the grid to determine which particles should be moved. Separate AoSoA variant.
LocalGridType | LocalGrid type. |
ParticlePositions | Particle position type. |
ParticleContainer | AoSoA type. |
local_grid | The local grid containing periodicity and system bounds. |
positions | Particle positions. |
src_particles | The source particle AoSoA. |
dst_particles | The destination particle AoSoA. |
min_halo_width | Number of halo mesh widths to allow particles before migrating. |
force_migrate | Migrate particles outside the local domain regardless of ghosted halo. |
bool Cabana::Grid::particleMigrate | ( | const LocalGridType & | local_grid, |
const ParticlePositions & | positions, | ||
ParticleContainer & | particles, | ||
const int | min_halo_width, | ||
const bool | force_migrate = false ) |
Migrate data from one uniquely-owned decomposition to another uniquely-owned decomposition, using the bounds and periodic boundaries of the grid to determine which particles should be moved. In-place variant.
LocalGridType | LocalGrid type. |
ParticlePositions | Particle position type. |
PositionContainer | AoSoA type. |
local_grid | The local grid containing periodicity and system bounds. |
positions | Particle positions. |
particles | The particle AoSoA. |
min_halo_width | Number of halo mesh widths to allow particles before migrating. |
force_migrate | Migrate particles outside the local domain regardless of ghosted halo. |