Simpatico  v1.10
AtomCollector.h
1 #ifndef DDMD_ATOM_COLLECTOR_H
2 #define DDMD_ATOM_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/chemistry/AtomArray.h> // member
13 #include <ddMd/storage/AtomIterator.h> // member
14 
15 namespace DdMd
16 {
17 
18  class AtomStorage;
19  class Domain;
20  class Buffer;
21 
22  using namespace Util;
23 
58  {
59 
60  public:
61 
65  AtomCollector();
66 
70  ~AtomCollector();
71 
77  void associate(Domain& domain, AtomStorage& storage, Buffer& buffer);
78 
87  void setCapacity(int recvArrayCapacity);
88 
94  void setup();
95 
103  Atom* nextPtr();
104 
110  void send();
111 
112  private:
113 
115  AtomArray recvArray_;
116 
118  AtomIterator iterator_;
119 
121  Domain* domainPtr_;
122 
124  AtomStorage* storagePtr_;
125 
127  Buffer* bufferPtr_;
128 
130  int source_;
131 
133  int recvBufferSize_;
134 
136  int recvArrayCapacity_;
137 
139  int recvArraySize_;
140 
142  int recvArrayId_;
143 
145  bool isComplete_;
146 
147  };
148 
149 }
150 #endif
A point particle in an MD simulation.
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 Atoms from processors to master processor.
Definition: AtomCollector.h:57
An array of Atom objects.
Definition: AtomArray.h:40
Utility classes for scientific computation.
Definition: accumulators.mod:1
A container for all the atoms and ghost atoms on this processor.
Buffer for interprocessor communication.
Definition: Buffer.h:217
Decomposition of the system into domains associated with processors.
Definition: Domain.h:31
An object that can read multiple parameters from file.
Iterator for all atoms owned by an AtomStorage.
Definition: AtomIterator.h:24