Simpatico  v1.10
List of all members | Public Member Functions
DdMd::GroupExchanger Class Referenceabstract

Detailed Description

Interface for a GroupStorage<N> for use in Exchanger.

Definition at line 33 of file GroupExchanger.h.

#include <GroupExchanger.h>

Inheritance diagram for DdMd::GroupExchanger:
DdMd::GroupStorage< N > DdMd::GroupStorage< 2 > DdMd::GroupStorage< 3 > DdMd::GroupStorage< 4 > DdMd::BondStorage DdMd::AngleStorage DdMd::DihedralStorage

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

Constructor & Destructor Documentation

DdMd::GroupExchanger::GroupExchanger ( )

Default constructor.

Definition at line 14 of file GroupExchanger.cpp.

DdMd::GroupExchanger::~GroupExchanger ( )
virtual

Destructor.

Definition at line 18 of file GroupExchanger.cpp.

Member Function Documentation

virtual void DdMd::GroupExchanger::markSpanningGroups ( FMatrix< double, Dimension, 2 > &  bound,
FMatrix< double, Dimension, 2 > &  inner,
FMatrix< double, Dimension, 2 > &  outer,
IntVector gridFlags 
)
pure virtual

Find and mark groups that span boundaries.

Parameters
boundboundaries of domain for this processor
innerinner slab boundaries (extended domain of neighbors)
outerouter slab boundaries (extended domain of this processor)
gridFlagselement i is 0 iff gridDimension[i] == 1, 1 otherwise

Implemented in DdMd::GroupStorage< N >, DdMd::GroupStorage< 2 >, DdMd::GroupStorage< 3 >, and DdMd::GroupStorage< 4 >.

virtual void DdMd::GroupExchanger::pack ( int  i,
int  j,
Buffer buffer 
)
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.

Parameters
iindex of Cartesian communication direction
jindex for sign of direction
bufferBuffer object into which groups are packed

Implemented in DdMd::GroupStorage< N >, DdMd::GroupStorage< 2 >, DdMd::GroupStorage< 3 >, and DdMd::GroupStorage< 4 >.

virtual void DdMd::GroupExchanger::unpack ( Buffer buffer,
AtomStorage atomStorage 
)
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.

Parameters
bufferBuffer object from which groups are unpacked
atomStorageAtomStorage used to find atoms pointers

Implemented in DdMd::GroupStorage< N >, DdMd::GroupStorage< 2 >, DdMd::GroupStorage< 3 >, and DdMd::GroupStorage< 4 >.

virtual void DdMd::GroupExchanger::markGhosts ( AtomStorage atomStorage,
FMatrix< GPArray< Atom >, Dimension, 2 > &  sendArray,
IntVector gridFlags 
)
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.

Parameters
atomStorageAtomStorage object
sendArrayMatrix of arrays of pointers to ghosts to send
gridFlagselement i is 0 iff gridDimension[i] == 1, 1 otherwise

Implemented in DdMd::GroupStorage< N >, DdMd::GroupStorage< 2 >, DdMd::GroupStorage< 3 >, and DdMd::GroupStorage< 4 >.

virtual void DdMd::GroupExchanger::findGhosts ( AtomStorage atomStorage)
pure virtual

Find all ghost members of groups.

Usage: This called after all ghosts have been exchanged.

Parameters
atomStorageAtomStorage object used to find atom pointers

Implemented in DdMd::GroupStorage< N >, DdMd::GroupStorage< 2 >, DdMd::GroupStorage< 3 >, and DdMd::GroupStorage< 4 >.

virtual bool DdMd::GroupExchanger::isValid ( AtomStorage atomStorage,
MPI::Intracomm &  communicator,
bool  hasGhosts 
)
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.

Parameters
atomStorageassociated AtomStorage object
hasGhoststrue if the atomStorage has ghosts, false otherwise
communicatordomain communicator

Implemented in DdMd::GroupStorage< N >, DdMd::GroupStorage< 2 >, DdMd::GroupStorage< 3 >, and DdMd::GroupStorage< 4 >.


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