ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
com.cpp File Reference

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)
 

Detailed Description

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:

  • update virtual sites
  • calculate forces
  • distribute forces
  • move non-virtual particles
  • update virtual sites

Definition in file com.cpp.

Function Documentation

◆ gather_buffer_map()

template<typename K , typename V >
void gather_buffer_map ( std::unordered_map< K, V > &  map_data)

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().

◆ is_vs_com()

◆ vs_com_back_transfer_forces_and_torques()

◆ vs_com_update_particles()