![]() |
ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
Ghost particles and particle exchange. More...
#include "ghosts.hpp"#include "BoxGeometry.hpp"#include "Particle.hpp"#include "system/System.hpp"#include <utils/serialization/memcpy_archive.hpp>#include <boost/archive/binary_iarchive.hpp>#include <boost/archive/binary_oarchive.hpp>#include <boost/iostreams/device/array.hpp>#include <boost/iostreams/device/back_inserter.hpp>#include <boost/iostreams/stream.hpp>#include <boost/mpi/collectives.hpp>#include <boost/range/numeric.hpp>#include <boost/serialization/vector.hpp>#include <algorithm>#include <cassert>#include <cstddef>#include <functional>#include <iterator>#include <limits>#include <span>#include <vector>
Include dependency graph for ghosts.cpp:Go to the source code of this file.
Classes | |
| class | CommBuf |
| Class that stores marshalled data for ghost communications. More... | |
| class | SerializationSizeCalculator |
| Pseudo-archive to calculate the size of the serialization buffer. More... | |
Macros | |
| #define | REQ_GHOST_SEND 100 |
| Tag for ghosts communications. | |
Enumerations | |
| enum class | ReductionPolicy { MOVE , UPDATE } |
| Type of reduction to carry out during serialization. More... | |
| enum class | SerializationDirection { SAVE , LOAD } |
| Whether to save the state to or load the state from the archive. More... | |
Ghost particles and particle exchange.
For more information on ghosts, see ghosts.hpp
Note on variable naming:
Definition in file ghosts.cpp.
| #define REQ_GHOST_SEND 100 |
Tag for ghosts communications.
Definition at line 58 of file ghosts.cpp.
|
strong |
Type of reduction to carry out during serialization.
| Enumerator | |
|---|---|
| MOVE | Reduction for domain-to-domain particle communication. |
| UPDATE | Reduction for cell-to-cell particle update. |
Definition at line 109 of file ghosts.cpp.
|
strong |
Whether to save the state to or load the state from the archive.
| Enumerator | |
|---|---|
| SAVE | |
| LOAD | |
Definition at line 117 of file ghosts.cpp.
|
static |
|
static |
|
static |
Definition at line 230 of file ghosts.cpp.
References MOVE, SAVE, serialize_and_reduce(), and stream.
Referenced by calc_transmit_size(), cell_cell_transfer(), ghost_communicator(), prepare_recv_buffer(), and prepare_send_buffer().
|
static |
Definition at line 239 of file ghosts.cpp.
References calc_transmit_size(), GHOSTTRANS_PARTNUM, and stream.
|
static |
Definition at line 378 of file ghosts.cpp.
References calc_transmit_size(), GHOSTTRANS_BONDS, GHOSTTRANS_PARTNUM, LOAD, CommBuf::make_span(), prepare_ghost_cell(), CommBuf::resize(), SAVE, serialize_and_reduce(), stream, and UPDATE.
Referenced by ghost_communicator().
| void ghost_communicator | ( | GhostCommunicator const & | gcr, |
| BoxGeometry const & | box_geo, | ||
| unsigned int | data_parts | ||
| ) |
Do a ghost communication with the specified data parts.
Definition at line 443 of file ghosts.cpp.
References add_forces_from_recv_buffer(), add_rattle_correction_from_recv_buffer(), calc_transmit_size(), cell_cell_transfer(), GHOST_BCST, GHOST_JOBMASK, GHOST_LOCL, GHOST_PREFETCH, GHOST_PSTSTORE, GHOST_RDCE, GHOST_RECV, GHOST_SEND, GHOSTTRANS_FORCE, GHOSTTRANS_NONE, GHOSTTRANS_RATTLE, is_recv_op(), is_send_op(), prepare_recv_buffer(), prepare_send_buffer(), put_recv_buffer(), REQ_GHOST_SEND, stream, and this_node.
Referenced by CellStructure::ghosts_count(), CellStructure::ghosts_reduce_forces(), CellStructure::ghosts_reduce_rattle_correction(), CellStructure::ghosts_update(), and HybridDecomposition::resort().
|
static |
Definition at line 435 of file ghosts.cpp.
References GHOST_JOBMASK, GHOST_PSTSTORE, is_recv_op(), stream, and this_node.
|
static |
Definition at line 427 of file ghosts.cpp.
References GHOST_JOBMASK, GHOST_PREFETCH, is_send_op(), stream, and this_node.
Definition at line 421 of file ghosts.cpp.
References GHOST_BCST, GHOST_RDCE, GHOST_RECV, stream, and this_node.
Referenced by ghost_communicator(), and is_poststorable().
Definition at line 416 of file ghosts.cpp.
References GHOST_BCST, GHOST_RDCE, GHOST_SEND, stream, and this_node.
Referenced by ghost_communicator(), and is_prefetchable().
|
static |
Definition at line 290 of file ghosts.cpp.
References Utils::Bag< T >::resize().
Referenced by cell_cell_transfer(), and put_recv_buffer().
|
static |
Definition at line 300 of file ghosts.cpp.
References calc_transmit_size(), and stream.
Referenced by ghost_communicator().
|
static |
Definition at line 252 of file ghosts.cpp.
References calc_transmit_size(), GHOSTTRANS_BONDS, GHOSTTRANS_PARTNUM, MOVE, SAVE, serialize_and_reduce(), and stream.
Referenced by ghost_communicator().
|
static |
Definition at line 310 of file ghosts.cpp.
References GHOSTTRANS_BONDS, GHOSTTRANS_PARTNUM, LOAD, MOVE, prepare_ghost_cell(), serialize_and_reduce(), and stream.
Referenced by ghost_communicator().
|
static |
Serialize particle data, possibly with reduction.
The reduction can take place during the save stage, e.g. to apply a ghost shift to the particle position, or during the load stage, e.g. to transfer momentum between particles in two local cells.
Definition at line 127 of file ghosts.cpp.
References Particle::dipm(), Particle::ext_force(), Particle::ext_torque(), Particle::fixed(), BoxGeometry::fold_position(), Particle::force(), Particle::gamma(), Particle::gamma_rot(), GHOSTTRANS_FORCE, GHOSTTRANS_MOMENTUM, GHOSTTRANS_POSITION, GHOSTTRANS_PROPRTS, GHOSTTRANS_RATTLE, Particle::id(), Particle::image_box(), LOAD, Particle::mass(), Particle::mol_id(), Particle::mu_E(), Particle::omega(), Particle::pos(), Particle::pos_last_time_step(), Particle::propagation(), Particle::q(), Particle::quat(), Particle::rattle_correction(), Particle::rinertia(), Particle::rotation(), SAVE, stream, Particle::swimming(), Particle::torque(), Particle::type(), UPDATE, Particle::v(), and Particle::vs_relative().
Referenced by calc_transmit_size(), cell_cell_transfer(), prepare_send_buffer(), and put_recv_buffer().