Gromacs  2026.0-dev-20250320-627336d
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
gmx::HaloExchange Class Reference

#include <gromacs/domdec/haloexchange.h>

Description

Handles the halo communication of coordinates and forces.

Public Member Functions

 HaloExchange (PbcType pbcType)
 
void setup (gmx_domdec_t *dd, t_state *localState, const gmx_ddbox_t &ddbox, t_forcerec *fr, const bool cellsChanged)
 Set up the halo communication, should be called after (re)partitioning.
 
void initiateReceiveX (ArrayRef< RVec > x)
 Iniatiate a non-blocking receive of the halo coordinates x. More...
 
void initiateSendX (const matrix box, ArrayRef< RVec > x)
 Initiate a non-blocking send of the halo coordinates x. More...
 
void completeReceiveX ()
 Complete a non-blocking receive of coordinates for the complete halo. More...
 
void completeSendX ()
 Ensures that x has been sent. More...
 
void moveX (const matrix box, ArrayRef< RVec > x)
 Send and receive the halo coordinates, call the 4 methods above.
 
void initiateReceiveF ()
 Initiate A non-blocking receive of the halo forces f. More...
 
void initiateSendF (ArrayRef< const RVec > f)
 Initiate the non-blocking receive of the halo forces f. More...
 
void completeReceiveF (ArrayRef< RVec > forces, ArrayRef< RVec > shiftForces)
 Ensures that f has been received and reduced the received forces. More...
 
void completeSendF ()
 Ensures that f has been sent. More...
 
void moveF (ArrayRef< RVec > f, ArrayRef< RVec > shiftForces)
 Send and receive the halo force, accumulates shift forces to shiftForces when non-empty.
 

Member Function Documentation

void gmx::HaloExchange::completeReceiveF ( ArrayRef< RVec forces,
ArrayRef< RVec shiftForces 
)

Ensures that f has been received and reduced the received forces.

If shiftForces is not empty, also updates the shift forces. Needs to be called after initiateReceiveF(). Call as late as possible.

void gmx::HaloExchange::completeReceiveX ( )

Complete a non-blocking receive of coordinates for the complete halo.

Needs to be called after initiateRecvX(). Call as late as possible.

void gmx::HaloExchange::completeSendF ( )

Ensures that f has been sent.

Needs to be called after initiateSendF(). Call as late as possible.

void gmx::HaloExchange::completeSendX ( )

Ensures that x has been sent.

Needs to be called after initiateSendX(). Call as late as possible.

void gmx::HaloExchange::initiateReceiveF ( )

Initiate A non-blocking receive of the halo forces f.

Should be called as early as possible for fast communication.

void gmx::HaloExchange::initiateReceiveX ( ArrayRef< RVec x)

Iniatiate a non-blocking receive of the halo coordinates x.

Should be called as early as possible for fast communication.

void gmx::HaloExchange::initiateSendF ( ArrayRef< const RVec f)

Initiate the non-blocking receive of the halo forces f.

Should be called as early as possible for fast communication.

void gmx::HaloExchange::initiateSendX ( const matrix  box,
ArrayRef< RVec x 
)

Initiate a non-blocking send of the halo coordinates x.

Should be called as early as possible when x is ready.


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