Simpatico
v1.10
|
Communication plan.
A plan contains intructions for a communication pattern for exchanging atoms, ghosts, or Groups.
A Plan has an exchange flag and storage flag for each of the directions in the Plimpton communication scheme. Each direction is indexed by a Cartesian index i=0,..,Dim-1 and j=0,1, where Dim is the dimensionality of space (i.e., normally Dim=3).
When used as a plan for an atom, each exchange flag should be set true in directions for which an atom should be communicated to exchange ownership, and each ghost flag should be set true for directions in which the atom must be sent as a ghost in order to provide position information to other processors.
When used as a plan for a Group, exchange flags are used to denote directions in which the Group must be sent, and ghost flags to denote directions in which the atoms of the Group must be sent as ghosts when the Group is divided among two or more processors.
Implementation: These 12 flags are stored in different bits of a single unsigned int that can also be accessed or set directly.
#include <Plan.h>
Public Member Functions | |
Plan () | |
Constructor. More... | |
void | setExchange (int i, int j) |
Set exchange flag for direction i, j (set true). More... | |
void | clearExchange (int i, int j) |
Clear exchange flag for direction i, j (set false). More... | |
void | setGhost (int i, int j) |
Set ghost flag for direction i, j (set true). More... | |
void | clearGhost (int i, int j) |
Clear ghost flag for direction i, j (set false). More... | |
void | setFlags (unsigned int flags) |
Set all flags (contains all bits). More... | |
void | clearFlags () |
Clear all flags (set all to false, set flags_ = 0). More... | |
bool | exchange (int i, int j) const |
Get bool exchange flag for direction i, j. More... | |
bool | ghost (int i, int j) const |
Get ghost flag for direction i, j. More... | |
unsigned int | flags () const |
Return raw flags unsigned int. More... | |
Friends | |
std::istream & | operator>> (std::istream &in, Plan &plan) |
istream extractor (>>) for a Plan. More... | |
std::ostream & | operator<< (std::ostream &out, const Plan &plan) |
ostream inserter (<<) for a Plan. More... | |
|
inline |
|
inline |
Set exchange flag for direction i, j (set true).
i | Cartesian axis index i=0,1,2=x,y,z |
j | binary direction index j=0, 1 |
Definition at line 65 of file Plan.h.
Referenced by DdMd::Exchanger::exchange(), and DdMd::operator>>().
|
inline |
Clear exchange flag for direction i, j (set false).
i | Cartesian axis index i=0,1,2=x,y,z |
j | binary direction index j=0 (up) 1 (down) |
Definition at line 74 of file Plan.h.
Referenced by DdMd::operator>>().
|
inline |
Set ghost flag for direction i, j (set true).
i | Cartesian axis index i=0,1,2=x,y,z |
j | binary direction index j=0 (up) 1 (down) |
Definition at line 83 of file Plan.h.
Referenced by DdMd::Exchanger::exchange(), DdMd::GroupStorage< N >::markGhosts(), and DdMd::operator>>().
|
inline |
Clear ghost flag for direction i, j (set false).
i | Cartesian axis index i=0,1,2=x,y,z |
j | binary direction index j=0 (up) 1 (down) |
Definition at line 92 of file Plan.h.
Referenced by DdMd::Exchanger::exchange(), and DdMd::operator>>().
|
inline |
Set all flags (contains all bits).
Definition at line 98 of file Plan.h.
References flags().
Referenced by DdMd::Exchanger::exchange(), and DdMd::Group< N >::unpack().
|
inline |
Clear all flags (set all to false, set flags_ = 0).
Definition at line 104 of file Plan.h.
Referenced by DdMd::Group< N >::clear(), DdMd::Exchanger::exchange(), and DdMd::Group< N >::Group().
|
inline |
Get bool exchange flag for direction i, j.
i | Cartesian axis index i=0,1,2=x,y,z |
j | binary direction index j=0 (up) 1 (down) |
Definition at line 113 of file Plan.h.
Referenced by DdMd::Exchanger::exchange(), DdMd::GroupStorage< N >::markSpanningGroups(), DdMd::operator<<(), and DdMd::GroupStorage< N >::pack().
|
inline |
Get ghost flag for direction i, j.
i | Cartesian axis index i=0,1,2=x,y,z |
j | binary direction index j=0 (up) 1 (down) |
Definition at line 122 of file Plan.h.
Referenced by DdMd::Exchanger::exchange(), and DdMd::operator<<().
|
inline |
Return raw flags unsigned int.
Definition at line 128 of file Plan.h.
References operator<<, and operator>>.
Referenced by DdMd::Atom::copyLocalGhost(), DdMd::Exchanger::exchange(), DdMd::Group< N >::pack(), and setFlags().
|
friend |
|
friend |