27#include <unordered_map>
28#include <unordered_set>
71 std::span<Cell *const> local_cells, std::span<Cell *const> ghost_cells,
74 std::unordered_set<ParticleList const *>
ghost_set;
76 for (
Cell *c : ghost_cells) {
81 for (
Cell *c : local_cells) {
82 c->m_is_boundary =
false;
87 for (
Cell *c : local_cells) {
88 for (
Cell *n : c->neighbors().all()) {
91 c->m_is_boundary =
true;
115 std::span<Cell *const> local_cells) {
117 std::unordered_map<ParticleList const *, Cell *>
pl_to_cell;
119 for (
Cell *c : local_cells) {
125 for (
auto const &
sr :
nc.send) {
128 it->second->m_is_boundary =
true;
134 for (
auto const &
lc : plan.
local) {
137 it->second->m_is_boundary =
true;
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
void mark_boundary_cells(std::span< Cell *const > local_cells, std::span< Cell *const > ghost_cells, std::function< bool(Cell const *, Cell const *)> wrap_predicate=nullptr)
Classify each local cell as interior or boundary.
void mark_plan_cells_boundary(HaloPlan const &plan, std::span< Cell *const > local_cells)
Mark plan-exported local cells as boundary (source 2, see mark_boundary_cells).
std::vector< NeighborComm > neighbors
std::vector< LocalComm > local