ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
ParticleDecomposition Class Referenceabstract

A distributed particle decomposition. More...

#include <ParticleDecomposition.hpp>

+ Inheritance diagram for ParticleDecomposition:

Public Member Functions

virtual void resort (bool global_flag, std::vector< ParticleChange > &diff)=0
 Resort particles.
 
virtual GhostCommunicator const & exchange_ghosts_comm () const =0
 Communicator for updating ghosts from the real particles.
 
virtual GhostCommunicator const & collect_ghost_force_comm () const =0
 Communicator for force reduction.
 
virtual std::span< Cell *const > local_cells () const =0
 Get pointer to local cells.
 
virtual std::span< Cell *const > ghost_cells () const =0
 Get pointer to local cells.
 
virtual Cellparticle_to_cell (Particle const &p)=0
 Determine which cell a particle id belongs to.
 
virtual Cell const * particle_to_cell (Particle const &p) const =0
 
virtual Utils::Vector3d max_cutoff () const =0
 Maximum supported cutoff.
 
virtual Utils::Vector3d max_range () const =0
 Range in which calculations are performed.
 
virtual std::optional< BoxGeometryminimum_image_distance () const =0
 Return the box geometry needed for distance calculation if minimum image convention should be used needed for distance calculation.
 
virtual BoxGeometry const & box () const =0
 
virtual ~ParticleDecomposition ()=default
 

Detailed Description

A distributed particle decomposition.

An implementation of this class organizes particles into cells. It owns the particles, and provides a way of restoring the order when it is disturbed, and provides a description of the neighborhood relations between the cells, by which pair interactions with particles near-by can be calculated. Related to this it provides descriptions of the ghost communications by which particles can be synchronized that are not owned locally, but interact with local particles.

Definition at line 59 of file ParticleDecomposition.hpp.

Constructor & Destructor Documentation

◆ ~ParticleDecomposition()

virtual ParticleDecomposition::~ParticleDecomposition ( )
virtualdefault

Member Function Documentation

◆ box()

virtual BoxGeometry const & ParticleDecomposition::box ( ) const
pure virtual

◆ collect_ghost_force_comm()

virtual GhostCommunicator const & ParticleDecomposition::collect_ghost_force_comm ( ) const
pure virtual

Communicator for force reduction.

Implemented in AtomDecomposition, HybridDecomposition, and RegularDecomposition.

◆ exchange_ghosts_comm()

virtual GhostCommunicator const & ParticleDecomposition::exchange_ghosts_comm ( ) const
pure virtual

Communicator for updating ghosts from the real particles.

Implemented in AtomDecomposition, HybridDecomposition, and RegularDecomposition.

◆ ghost_cells()

virtual std::span< Cell *const > ParticleDecomposition::ghost_cells ( ) const
pure virtual

Get pointer to local cells.

Ghost cells are cells that contain particles that are owned by different nodes but interact with particles on this node.

Returns
List of ghost cells.

Implemented in AtomDecomposition, HybridDecomposition, and RegularDecomposition.

◆ local_cells()

virtual std::span< Cell *const > ParticleDecomposition::local_cells ( ) const
pure virtual

Get pointer to local cells.

Local cells are cells that contain particles that are owned by this node.

Returns
List of local cells.

Implemented in AtomDecomposition, HybridDecomposition, and RegularDecomposition.

Referenced by CellStructure::add_particle(), CellStructure::check_particle_sorting(), CellStructure::remove_all_particles(), and CellStructure::remove_particle().

◆ max_cutoff()

virtual Utils::Vector3d ParticleDecomposition::max_cutoff ( ) const
pure virtual

Maximum supported cutoff.

Implemented in AtomDecomposition, HybridDecomposition, and RegularDecomposition.

Referenced by CellStructure::max_cutoff().

◆ max_range()

virtual Utils::Vector3d ParticleDecomposition::max_range ( ) const
pure virtual

Range in which calculations are performed.

Implemented in AtomDecomposition, HybridDecomposition, and RegularDecomposition.

Referenced by CellStructure::max_range().

◆ minimum_image_distance()

virtual std::optional< BoxGeometry > ParticleDecomposition::minimum_image_distance ( ) const
pure virtual

Return the box geometry needed for distance calculation if minimum image convention should be used needed for distance calculation.

Implemented in AtomDecomposition, HybridDecomposition, and RegularDecomposition.

Referenced by CellStructure::run_on_particle_short_range_neighbors().

◆ particle_to_cell() [1/2]

virtual Cell const * ParticleDecomposition::particle_to_cell ( Particle const &  p) const
pure virtual

◆ particle_to_cell() [2/2]

virtual Cell * ParticleDecomposition::particle_to_cell ( Particle const &  p)
pure virtual

Determine which cell a particle id belongs to.

Parameters
pParticle to find cell for.
Returns
Pointer to cell or nullptr if not local.

Implemented in AtomDecomposition, HybridDecomposition, and RegularDecomposition.

◆ resort()

virtual void ParticleDecomposition::resort ( bool  global_flag,
std::vector< ParticleChange > &  diff 
)
pure virtual

Resort particles.

After calling this function, every particle is in its home cell. The output parameter is filled with the changes to the local particle content, which allows e.g. to keep particles indices in an efficient way.

This is a collective call.

Parameters
[in]global_flagExpect particles to be displaced by more than a local box size.
[out]diffCells that have been touched.

Implemented in HybridDecomposition, RegularDecomposition, and AtomDecomposition.


The documentation for this class was generated from the following file: