Simpatico  v1.10
GroupCollector.h
1 #ifndef DDMD_GROUP_COLLECTOR_H
2 #define DDMD_GROUP_COLLECTOR_H
3 
4 /*
5 * Simpatico - Simulation Package for Polymeric and Molecular Liquids
6 *
7 * Copyright 2010 - 2017, The Regents of the University of Minnesota
8 * Distributed under the terms of the GNU General Public License.
9 */
10 
11 #include <util/param/ParamComposite.h> // base class
12 #include <ddMd/storage/GroupIterator.h> // member
13 #include <ddMd/chemistry/Group.h> // member
14 #include <util/containers/DArray.h> // member
15 
16 namespace DdMd
17 {
18 
19  class Domain;
20  class Buffer;
21  template <int N> class GroupStorage;
22 
23  using namespace Util;
24 
59  template <int N>
60  class GroupCollector : public ParamComposite
61  {
62 
63  public:
64 
69 
73  ~GroupCollector();
74 
80  void associate(Domain& domain, GroupStorage<N>& storage, Buffer& buffer);
81 
92  void setCapacity(int recvArrayCapacity);
93 
99  void setup();
100 
116  Group<N>* nextPtr();
117 
123  void send();
124 
125  private:
126 
128  DArray< Group<N> > recvArray_;
129 
131  GroupIterator<N> iterator_;
132 
134  Domain* domainPtr_;
135 
137  GroupStorage<N>* storagePtr_;
138 
140  Buffer* bufferPtr_;
141 
143  int source_;
144 
146  int recvArrayCapacity_;
147 
149  int recvBufferSize_;
150 
152  int recvArraySize_;
153 
155  int recvArrayId_;
156 
158  bool isComplete_;
159 
160  };
161 
162 }
163 #endif
Parallel domain decomposition (DD) MD simulation.
void send(MPI::Comm &comm, T &data, int dest, int tag)
Send a single T value.
Definition: MpiSendRecv.h:97
Class for collecting Groups from processors to master processor.
Iterator for all Group < N > objects owned by a GroupStorage< N >.
Definition: GroupIterator.h:25
Utility classes for scientific computation.
Definition: accumulators.mod:1
A container for all the Group<N> objects on this processor.
Buffer for interprocessor communication.
Definition: Buffer.h:217
Decomposition of the system into domains associated with processors.
Definition: Domain.h:31
Dynamically allocatable contiguous array template.
Definition: DArray.h:31
A group of covalently interacting atoms.
An object that can read multiple parameters from file.