36#include <boost/mpi/communicator.hpp>
56 boost::mpi::communicator m_comm;
58 double m_cutoff_regular;
59 std::vector<Cell *> m_local_cells;
60 std::vector<Cell *> m_ghost_cells;
75 std::set<int>
const m_n_square_types;
77 std::function<bool()> m_get_global_ghost_flags;
79 bool is_n_square_type(
int type_id)
const {
80 return m_n_square_types.contains(type_id);
85 double skin, std::function<
bool()> get_ghost_flags,
87 std::set<int> n_square_types);
95 void resort(
bool global, std::vector<ParticleChange> &diff)
override;
101 std::span<Cell *const>
local_cells()
const override {
return m_local_cells; }
102 std::span<Cell *const>
ghost_cells()
const override {
return m_ghost_cells; }
105 if (is_n_square_type(p.
type())) {
112 if (is_n_square_type(p.
type())) {
147 std::size_t count_particles(std::vector<Cell *>
const &
local_cells)
const;
Vector implementation and trait types for boost qvm interoperability.
Atom decomposition cell system.
Utils::Vector3d max_range() const override
Utils::Vector3d max_cutoff() const override
auto const & get_local_cells() const
Cell * particle_to_cell(Particle const &p) override
Determine which cell a particle id belongs to.
Hybrid decomposition cell system.
std::span< Cell *const > local_cells() const override
std::size_t count_particles_in_regular() const
Count particles in child regular decompositions.
GhostComm::HaloPlan const * halo_plan() const override
Utils::Vector3d max_range() const override
auto get_cutoff_regular() const
std::size_t count_particles_in_n_square() const
Count particles in child N-square decompositions.
Cell * particle_to_cell(Particle const &p) override
auto get_cell_grid() const
Cell const * particle_to_cell(Particle const &p) const override
void resort(bool global, std::vector< ParticleChange > &diff) override
BoxGeometry const & box() const override
auto get_n_square_types() const
auto get_cell_size() const
Utils::Vector3d max_cutoff() const override
std::optional< BoxGeometry > minimum_image_distance() const override
std::span< Cell *const > ghost_cells() const override
A distributed particle decomposition.
Struct holding all information for one particle.
constexpr auto const & type() const
Regular decomposition cell system.
Cell * particle_to_cell(Particle const &p) override
Utils::Vector3d cell_size
Cell size.
auto const & get_local_cells() const
Utils::Vector3i cell_grid
Grid dimensions per node.