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

Atom decomposition cell system. More...

#include <AtomDecomposition.hpp>

+ Inheritance diagram for AtomDecomposition:
+ Collaboration diagram for AtomDecomposition:

Public Member Functions

 AtomDecomposition (BoxGeometry const &m_box)
 
 AtomDecomposition (boost::mpi::communicator comm, BoxGeometry const &box_geo)
 
void resort (bool global_flag, std::vector< ParticleChange > &diff) override
 
GhostCommunicator const & exchange_ghosts_comm () const override
 
GhostCommunicator const & collect_ghost_force_comm () const override
 
std::span< Cell *const > local_cells () const override
 
std::span< Cell *const > ghost_cells () const override
 
auto const & get_local_cells () const
 
auto const & get_ghost_cells () const
 
Cellparticle_to_cell (Particle const &p) override
 Determine which cell a particle id belongs to.
 
Cell const * particle_to_cell (Particle const &p) const override
 
Utils::Vector3d max_cutoff () const override
 
Utils::Vector3d max_range () const override
 
std::optional< BoxGeometryminimum_image_distance () const override
 
BoxGeometry const & box () const override
 
- Public Member Functions inherited from ParticleDecomposition
virtual ~ParticleDecomposition ()=default
 

Detailed Description

Atom decomposition cell system.

This implements a distributed particle storage by just evenly distributing the particles over all part-taking nodes. Pairs are found by just considering all pairs independent of logical or physical location, it has therefore quadratic time complexity in the number of particles.

For a more detailed discussion please see [33].

Definition at line 53 of file AtomDecomposition.hpp.

Constructor & Destructor Documentation

◆ AtomDecomposition() [1/2]

AtomDecomposition::AtomDecomposition ( BoxGeometry const &  m_box)

Definition at line 147 of file AtomDecomposition.cpp.

◆ AtomDecomposition() [2/2]

AtomDecomposition::AtomDecomposition ( boost::mpi::communicator  comm,
BoxGeometry const &  box_geo 
)

Definition at line 150 of file AtomDecomposition.cpp.

Member Function Documentation

◆ box()

BoxGeometry const & AtomDecomposition::box ( ) const
inlineoverridevirtual

Implements ParticleDecomposition.

Definition at line 109 of file AtomDecomposition.hpp.

◆ collect_ghost_force_comm()

GhostCommunicator const & AtomDecomposition::collect_ghost_force_comm ( ) const
inlineoverridevirtual

Implements ParticleDecomposition.

Definition at line 74 of file AtomDecomposition.hpp.

Referenced by HybridDecomposition::HybridDecomposition().

◆ exchange_ghosts_comm()

GhostCommunicator const & AtomDecomposition::exchange_ghosts_comm ( ) const
inlineoverridevirtual

Implements ParticleDecomposition.

Definition at line 71 of file AtomDecomposition.hpp.

Referenced by HybridDecomposition::HybridDecomposition().

◆ get_ghost_cells()

auto const & AtomDecomposition::get_ghost_cells ( ) const
inline

Definition at line 83 of file AtomDecomposition.hpp.

Referenced by HybridDecomposition::HybridDecomposition().

◆ get_local_cells()

auto const & AtomDecomposition::get_local_cells ( ) const
inline

◆ ghost_cells()

std::span< Cell *const > AtomDecomposition::ghost_cells ( ) const
inlineoverridevirtual

Implements ParticleDecomposition.

Definition at line 79 of file AtomDecomposition.hpp.

◆ local_cells()

std::span< Cell *const > AtomDecomposition::local_cells ( ) const
inlineoverridevirtual

Implements ParticleDecomposition.

Definition at line 78 of file AtomDecomposition.hpp.

Referenced by HybridDecomposition::resort().

◆ max_cutoff()

Utils::Vector3d AtomDecomposition::max_cutoff ( ) const
overridevirtual

◆ max_range()

Utils::Vector3d AtomDecomposition::max_range ( ) const
overridevirtual

Implements ParticleDecomposition.

Definition at line 165 of file AtomDecomposition.cpp.

References max_cutoff().

Referenced by HybridDecomposition::max_range().

◆ minimum_image_distance()

std::optional< BoxGeometry > AtomDecomposition::minimum_image_distance ( ) const
inlineoverridevirtual

Implements ParticleDecomposition.

Definition at line 105 of file AtomDecomposition.hpp.

◆ particle_to_cell() [1/2]

Cell const * AtomDecomposition::particle_to_cell ( Particle const &  p) const
inlineoverridevirtual

Implements ParticleDecomposition.

Definition at line 96 of file AtomDecomposition.hpp.

References Particle::id().

◆ particle_to_cell() [2/2]

Cell * AtomDecomposition::particle_to_cell ( Particle const &  p)
inlineoverridevirtual

Determine which cell a particle id belongs to.

Since there is only one local cell this is trivial.

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

Implements ParticleDecomposition.

Definition at line 93 of file AtomDecomposition.hpp.

References Particle::id().

Referenced by HybridDecomposition::particle_to_cell(), and HybridDecomposition::particle_to_cell().

◆ resort()

void AtomDecomposition::resort ( bool  global_flag,
std::vector< ParticleChange > &  diff 
)
overridevirtual

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