1 #ifndef DDMD_GROUP_STORAGE_H 2 #define DDMD_GROUP_STORAGE_H 12 #include <util/param/ParamComposite.h> 13 #include <ddMd/storage/GroupExchanger.h> 14 #include <ddMd/communicate/GroupDistributor.h> 15 #include <ddMd/communicate/GroupCollector.h> 16 #include <ddMd/chemistry/Atom.h> 17 #include <ddMd/chemistry/Group.h> 18 #include <util/space/IntVector.h> 19 #include <util/containers/DArray.h> 20 #include <util/containers/GPArray.h> 21 #include <util/containers/FMatrix.h> 22 #include <util/containers/ArraySet.h> 23 #include <util/containers/ArrayStack.h> 25 #include "GroupIterator.h" 26 #include "ConstGroupIterator.h" 67 void associate(Domain& domain, AtomStorage& atomStorage,
79 void initialize(
int capacity,
int totalCapacity);
92 virtual void readParameters(std::istream& in);
176 Group<N>* add(
int id);
195 void remove(Group<N>* groupPtr);
214 int capacity()
const;
225 void begin(GroupIterator<N>& iterator);
232 void begin(ConstGroupIterator<N>& iterator)
const;
239 Group<N>* find(
int id)
const;
252 int totalCapacity()
const;
268 void computeNTotal(MPI::Intracomm& communicator);
270 void computeNTotal();
319 void pack(
int i,
int j, Buffer& buffer);
328 void unpack(Buffer& buffer, AtomStorage& atomStorage);
329 #endif // endif ifdef UTIL_MPI 343 void markGhosts(AtomStorage& atomStorage,
355 void findGhosts(AtomStorage& atomStorage);
372 bool isValid(AtomStorage& atomStorage, MPI::Intracomm& communicator,
376 bool isValid(AtomStorage& atomStorage,
bool hasGhosts);
389 virtual void computeStatistics(MPI::Intracomm& communicator);
391 virtual void computeStatistics();
397 void clearStatistics();
406 void outputStatistics(std::ostream& out);
413 int maxNGroup()
const;
422 GroupDistributor<N>& distributor();
427 GroupCollector<N>& collector();
473 GroupDistributor<N> distributor_;
474 GroupCollector<N> collector_;
487 {
return groupSet_.size(); }
491 {
return capacity_; }
495 {
return totalCapacity_; }
499 {
return nTotal_.value(); }
506 {
return groupPtrs_[id]; }
513 { groupSet_.begin(iterator); }
521 { groupSet_.begin(iterator); }
525 {
return distributor_; }
529 {
return collector_; }
GroupDistributor< N > & distributor()
Get the GroupDistributor by reference.
const int Dimension
Dimensionality of space.
File containing preprocessor macros for error handling.
Parallel domain decomposition (DD) MD simulation.
int capacity() const
Return capacity for groups on this processor.
Saving / output archive for binary ostream.
Class for collecting Groups from processors to master processor.
Iterator for all Group < N > objects owned by a GroupStorage< N >.
A container for pointers to a subset of elements of an associated array.
Utility classes for scientific computation.
Const iterator for all Group < N > objects owned by a GroupStorage < N >.
A stack of fixed capacity.
void begin(GroupIterator< N > &iterator)
Set iterator to beginning of the set of groups.
GroupCollector< N > & collector()
Get the GroupCollector by reference.
int totalCapacity() const
Return maximum allowed number of groups on all processors.
int nTotal() const
Return total number of distinct groups on all processors.
Dynamically allocatable contiguous array template.
Saving archive for binary istream.
An IntVector is an integer Cartesian vector.
A group of covalently interacting atoms.
An automatically growable PArray.
An object that can read multiple parameters from file.
int size() const
Return current number of groups on this processor.
Class template for distributing Group<N> objects among processors.
Group< N > * find(int id) const
Find local Group<N> indexed by global id.