Simpatico
v1.10
|
Interface for a GroupStorage<N> for use in Exchanger.
Definition at line 33 of file GroupExchanger.h.
#include <GroupExchanger.h>
Public Member Functions | |
GroupExchanger () | |
Default constructor. More... | |
virtual | ~GroupExchanger () |
Destructor. More... | |
virtual void | markSpanningGroups (FMatrix< double, Dimension, 2 > &bound, FMatrix< double, Dimension, 2 > &inner, FMatrix< double, Dimension, 2 > &outer, IntVector &gridFlags)=0 |
Find and mark groups that span boundaries. More... | |
virtual void | pack (int i, int j, Buffer &buffer)=0 |
Pack groups for exchange. More... | |
virtual void | unpack (Buffer &buffer, AtomStorage &atomStorage)=0 |
Unpack groups from buffer and find available associated atoms. More... | |
virtual void | markGhosts (AtomStorage &atomStorage, FMatrix< GPArray< Atom >, Dimension, 2 > &sendArray, IntVector &gridFlags)=0 |
Set ghost communication plans for all atoms in incomplete groups. More... | |
virtual void | findGhosts (AtomStorage &atomStorage)=0 |
Find all ghost members of groups. More... | |
virtual bool | isValid (AtomStorage &atomStorage, MPI::Intracomm &communicator, bool hasGhosts)=0 |
Return true if the container is valid, or throw an Exception. More... | |
DdMd::GroupExchanger::GroupExchanger | ( | ) |
Default constructor.
Definition at line 14 of file GroupExchanger.cpp.
|
virtual |
Destructor.
Definition at line 18 of file GroupExchanger.cpp.
|
pure virtual |
Find and mark groups that span boundaries.
bound | boundaries of domain for this processor |
inner | inner slab boundaries (extended domain of neighbors) |
outer | outer slab boundaries (extended domain of this processor) |
gridFlags | element i is 0 iff gridDimension[i] == 1, 1 otherwise |
Implemented in DdMd::GroupStorage< N >, DdMd::GroupStorage< 2 >, DdMd::GroupStorage< 3 >, and DdMd::GroupStorage< 4 >.
|
pure virtual |
Pack groups for exchange.
Usage: This is called after atom exchange plans are set, but before atoms marked for exchange in direction i, j have been removed from the atomStorage.
i | index of Cartesian communication direction |
j | index for sign of direction |
buffer | Buffer object into which groups are packed |
Implemented in DdMd::GroupStorage< N >, DdMd::GroupStorage< 2 >, DdMd::GroupStorage< 3 >, and DdMd::GroupStorage< 4 >.
|
pure virtual |
Unpack groups from buffer and find available associated atoms.
This function should unpack groups, add new ones to a GroupStorage, set pointers to all Group atoms that are in the AtomStorage, and nullify pointers to atoms that are not present.
buffer | Buffer object from which groups are unpacked |
atomStorage | AtomStorage used to find atoms pointers |
Implemented in DdMd::GroupStorage< N >, DdMd::GroupStorage< 2 >, DdMd::GroupStorage< 3 >, and DdMd::GroupStorage< 4 >.
|
pure virtual |
Set ghost communication plans for all atoms in incomplete groups.
Usage: This is called after exchanging all atoms and groups between processors, but before exchanging ghosts. At this point, atom ownership is finalized, but there are no ghosts.
atomStorage | AtomStorage object |
sendArray | Matrix of arrays of pointers to ghosts to send |
gridFlags | element i is 0 iff gridDimension[i] == 1, 1 otherwise |
Implemented in DdMd::GroupStorage< N >, DdMd::GroupStorage< 2 >, DdMd::GroupStorage< 3 >, and DdMd::GroupStorage< 4 >.
|
pure virtual |
Find all ghost members of groups.
Usage: This called after all ghosts have been exchanged.
atomStorage | AtomStorage object used to find atom pointers |
Implemented in DdMd::GroupStorage< N >, DdMd::GroupStorage< 2 >, DdMd::GroupStorage< 3 >, and DdMd::GroupStorage< 4 >.
|
pure virtual |
Return true if the container is valid, or throw an Exception.
Calls overloaded isValid() function, then checks consistency of atom pointers with those in an asociated AtomStorage. If hasGhosts is false, the function requires that no group contain a pointer to a ghost atom. If hasGhosts is true, requires that every Group be complete.
atomStorage | associated AtomStorage object |
hasGhosts | true if the atomStorage has ghosts, false otherwise |
communicator | domain communicator |
Implemented in DdMd::GroupStorage< N >, DdMd::GroupStorage< 2 >, DdMd::GroupStorage< 3 >, and DdMd::GroupStorage< 4 >.