![]() |
ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
This file contains routine to handle virtual sites at the center of mass of a bunch of other particles (say, a molecule). More...
#include <config/config.hpp>#include "BoxGeometry.hpp"#include "Particle.hpp"#include "PropagationMode.hpp"#include "cell_system/CellStructure.hpp"#include "cells.hpp"#include "communication.hpp"#include "forces.hpp"#include <utils/Vector.hpp>#include <utils/mpi/gather_buffer.hpp>#include <boost/archive/text_iarchive.hpp>#include <boost/archive/text_oarchive.hpp>#include <boost/mpi/collectives/all_gather.hpp>#include <boost/mpi/collectives/all_reduce.hpp>#include <boost/mpi/collectives/broadcast.hpp>#include <boost/serialization/unordered_set.hpp>#include <boost/serialization/utility.hpp>#include <boost/serialization/vector.hpp>#include <functional>#include <ranges>#include <unordered_map>#include <unordered_set>#include <vector>
Include dependency graph for com.cpp:Go to the source code of this file.
Classes | |
| struct | ComInfo |
| Center of mass information for a molecule. More... | |
Functions | |
| static bool | is_vs_com (Particle const &p) |
| template<typename K , typename V > | |
| void | gather_buffer_map (std::unordered_map< K, V > &map_data) |
| Synchronize a map across all MPI ranks. | |
| void | vs_com_update_particles (CellStructure &cell_structure, BoxGeometry const &box_geo) |
| void | vs_com_back_transfer_forces_and_torques (CellStructure &cell_structure) |
This file contains routine to handle virtual sites at the center of mass of a bunch of other particles (say, a molecule).
Forces acting on the center of mass are distributed back onto the constituent particles. The position/velocity/mass of the virtual site at center of mass is calculated from the positions/velocities/masses of many particles.
Virtual sites are like particles, but they will not be integrated. Step performed for virtual sites:
Definition in file com.cpp.
Synchronize a map across all MPI ranks.
Gathers all key-value pairs from all ranks, broadcasts the full set to every rank, and reconstructs the map so all processes have the same data.
Definition at line 98 of file com.cpp.
References comm_cart, Utils::Mpi::gather_buffer(), and stream.
Referenced by vs_com_back_transfer_forces_and_torques(), and vs_com_update_particles().
Definition at line 87 of file com.cpp.
References Particle::propagation(), and PropagationMode::TRANS_VS_CENTER_OF_MASS.
Referenced by vs_com_back_transfer_forces_and_torques(), and vs_com_update_particles().
| void vs_com_back_transfer_forces_and_torques | ( | CellStructure & | cell_structure | ) |
Definition at line 209 of file com.cpp.
References CellStructure::for_each_local_particle(), Particle::force(), gather_buffer_map(), CellStructure::ghosts_reduce_forces(), Particle::id(), init_forces_ghosts(), is_vs_com(), Particle::mass(), Particle::mol_id(), stream, and Particle::vs_com().
Referenced by System::System::calculate_forces().
| void vs_com_update_particles | ( | CellStructure & | cell_structure, |
| BoxGeometry const & | box_geo | ||
| ) |
Definition at line 105 of file com.cpp.
References comm_cart, Cells::DATA_PART_POSITION, BoxGeometry::fold_position(), CellStructure::for_each_local_particle(), gather_buffer_map(), CellStructure::get_local_particle(), CellStructure::ghosts_update(), Particle::id(), Particle::image_box(), Particle::is_virtual(), is_vs_com(), Particle::mass(), Particle::mol_id(), Particle::pos(), stream, BoxGeometry::unfolded_position(), and Particle::vs_com().
Referenced by System::System::integrate(), and System::System::update_dependent_particles().