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 GhostComm::HaloPlan const * halo_plan () const =0
 Topology-agnostic halo-exchange plan.
 
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 58 of file ParticleDecomposition.hpp.

Constructor & Destructor Documentation

◆ ~ParticleDecomposition()

virtual ParticleDecomposition::~ParticleDecomposition ( )
virtualdefault

Member Function Documentation

◆ box()

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

◆ 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.

◆ halo_plan()

virtual GhostComm::HaloPlan const * ParticleDecomposition::halo_plan ( ) const
pure virtual

Topology-agnostic halo-exchange plan.

Returns a GhostComm::HaloPlan describing the ghost communication for this decomposition. All decompositions implement this.

Implemented in AtomDecomposition, HybridDecomposition, and RegularDecomposition.

◆ local_cells()

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

◆ 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: