![]() |
ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
Regular decomposition cell system. More...
#include <RegularDecomposition.hpp>
Inheritance diagram for RegularDecomposition:
Collaboration diagram for RegularDecomposition:Public Attributes | |
| Utils::Vector3i | cell_grid = {} |
| Grid dimensions per node. | |
| Utils::Vector3d | cell_size = {} |
| Cell size. | |
| Utils::Vector3i | cell_offset = {} |
| Offset in global grid. | |
| Utils::Vector3i | ghost_cell_grid = {} |
| linked cell grid with ghost frame. | |
| Utils::Vector3d | inv_cell_size = {} |
| inverse cell_size. | |
| boost::mpi::communicator | m_comm |
| BoxGeometry const & | m_box |
| LocalBox | m_local_box |
| std::optional< std::pair< int, int > > | m_fully_connected_boundary = {} |
| std::vector< Cell > | cells |
| std::vector< Cell * > | m_local_cells |
| std::vector< Cell * > | m_ghost_cells |
| GhostCommunicator | m_exchange_ghosts_comm |
| GhostCommunicator | m_collect_ghost_force_comm |
Regular decomposition cell system.
The domain of a node is split into a 3D cell grid with dimension cell_grid. Together with one ghost cell layer on each side the overall dimension of the ghost cell grid is ghost_cell_grid. The regular decomposition enables the use of the linked cell algorithm which is in turn used for setting up the Verlet list for the system. You can see a 2D graphical representation of the linked cell grid below.
2D representation of a linked cell grid: cell_grid = {4,4}, ghost_cell_grid = {6,6}
Each cell has \( 3^D \) neighbor cells. Since we deal with pair forces, it is sufficient to calculate only half of the interactions (Newton's law: action = reaction). We have chosen the upper half e.g. all neighbor cells with a higher linear index (for cell 14 they are marked in light blue). Caution: This implementation needs double sided ghost communication! For single sided ghost communication one would need some ghost-ghost cell interaction as well, which we do not need!
Definition at line 67 of file RegularDecomposition.hpp.
| RegularDecomposition::RegularDecomposition | ( | boost::mpi::communicator | comm, |
| double | range, | ||
| BoxGeometry const & | box_geo, | ||
| LocalBox const & | local_geo, | ||
| std::optional< std::pair< int, int > > | fully_connected | ||
| ) |
Definition at line 704 of file RegularDecomposition.cpp.
References m_collect_ghost_force_comm, m_exchange_ghosts_comm, and stream.
|
inlineoverridevirtual |
Implements ParticleDecomposition.
Definition at line 126 of file RegularDecomposition.hpp.
References m_box.
|
inlineoverridevirtual |
Implements ParticleDecomposition.
Definition at line 97 of file RegularDecomposition.hpp.
References m_collect_ghost_force_comm.
Referenced by HybridDecomposition::HybridDecomposition().
|
inlineoverridevirtual |
Implements ParticleDecomposition.
Definition at line 94 of file RegularDecomposition.hpp.
References m_exchange_ghosts_comm.
Referenced by HybridDecomposition::HybridDecomposition().
|
inline |
Definition at line 120 of file RegularDecomposition.hpp.
References m_fully_connected_boundary.
Definition at line 106 of file RegularDecomposition.hpp.
References m_ghost_cells.
Referenced by HybridDecomposition::HybridDecomposition().
Definition at line 105 of file RegularDecomposition.hpp.
References m_local_cells.
Referenced by HybridDecomposition::count_particles_in_regular(), HybridDecomposition::HybridDecomposition(), and HybridDecomposition::resort().
Implements ParticleDecomposition.
Definition at line 102 of file RegularDecomposition.hpp.
References m_ghost_cells.
Implements ParticleDecomposition.
Definition at line 101 of file RegularDecomposition.hpp.
References m_local_cells.
Referenced by HybridDecomposition::HybridDecomposition(), HybridDecomposition::resort(), and resort().
|
overridevirtual |
Implements ParticleDecomposition.
Definition at line 269 of file RegularDecomposition.cpp.
References BoxGeometry::length(), LocalBox::length(), m_box, m_local_box, and stream.
|
overridevirtual |
Implements ParticleDecomposition.
Definition at line 277 of file RegularDecomposition.cpp.
References cell_size.
|
inlineoverridevirtual |
Implements ParticleDecomposition.
Definition at line 122 of file RegularDecomposition.hpp.
References m_box.
|
inlineoverridevirtual |
Implements ParticleDecomposition.
Definition at line 112 of file RegularDecomposition.hpp.
References Particle::pos().
Implements ParticleDecomposition.
Definition at line 108 of file RegularDecomposition.hpp.
References Particle::pos().
Referenced by HybridDecomposition::particle_to_cell(), HybridDecomposition::particle_to_cell(), and resort().
|
overridevirtual |
Implements ParticleDecomposition.
Definition at line 175 of file RegularDecomposition.cpp.
References fold_and_reset(), RemovedParticle::id, local_cells(), m_box, m_comm, particle_to_cell(), runtimeErrorMsg, and stream.
Referenced by HybridDecomposition::resort().
| Utils::Vector3i RegularDecomposition::cell_grid = {} |
Grid dimensions per node.
Definition at line 69 of file RegularDecomposition.hpp.
Referenced by HybridDecomposition::get_cell_grid().
| Utils::Vector3i RegularDecomposition::cell_offset = {} |
Offset in global grid.
Definition at line 73 of file RegularDecomposition.hpp.
| Utils::Vector3d RegularDecomposition::cell_size = {} |
Cell size.
Definition at line 71 of file RegularDecomposition.hpp.
Referenced by HybridDecomposition::get_cell_size(), and max_range().
| std::vector<Cell> RegularDecomposition::cells |
Definition at line 83 of file RegularDecomposition.hpp.
| Utils::Vector3i RegularDecomposition::ghost_cell_grid = {} |
linked cell grid with ghost frame.
Definition at line 75 of file RegularDecomposition.hpp.
| Utils::Vector3d RegularDecomposition::inv_cell_size = {} |
inverse cell_size.
Definition at line 77 of file RegularDecomposition.hpp.
| BoxGeometry const& RegularDecomposition::m_box |
Definition at line 80 of file RegularDecomposition.hpp.
Referenced by box(), max_cutoff(), minimum_image_distance(), and resort().
| GhostCommunicator RegularDecomposition::m_collect_ghost_force_comm |
Definition at line 87 of file RegularDecomposition.hpp.
Referenced by collect_ghost_force_comm(), and RegularDecomposition().
| boost::mpi::communicator RegularDecomposition::m_comm |
Definition at line 79 of file RegularDecomposition.hpp.
Referenced by resort().
| GhostCommunicator RegularDecomposition::m_exchange_ghosts_comm |
Definition at line 86 of file RegularDecomposition.hpp.
Referenced by exchange_ghosts_comm(), and RegularDecomposition().
Definition at line 82 of file RegularDecomposition.hpp.
Referenced by fully_connected_boundary().
| std::vector<Cell *> RegularDecomposition::m_ghost_cells |
Definition at line 85 of file RegularDecomposition.hpp.
Referenced by get_ghost_cells(), and ghost_cells().
| LocalBox RegularDecomposition::m_local_box |
Definition at line 81 of file RegularDecomposition.hpp.
Referenced by max_cutoff().
| std::vector<Cell *> RegularDecomposition::m_local_cells |
Definition at line 84 of file RegularDecomposition.hpp.
Referenced by get_local_cells(), and local_cells().