Gromacs
2026.0-dev-20250320-627336d
|
#include <gromacs/domdec/haloexchange.h>
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. | |
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.
Iniatiate a non-blocking receive of the halo coordinates x.
Should be called as early as possible for fast communication.
Initiate the non-blocking receive of the halo forces f.
Should be called as early as possible for fast communication.
Initiate a non-blocking send of the halo coordinates x.
Should be called as early as possible when x is ready.