Simpatico  v1.10
GroupExchanger.h
1 #ifndef DDMD_GROUP_EXCHANGER_H
2 #define DDMD_GROUP_EXCHANGER_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/global.h>
12 #include <util/space/Dimension.h>
13 
14 namespace Util {
15  class IntVector;
16  template <typename T, int M, int N> class FMatrix;
17  template <typename T> class GPArray;
18 }
19 
20 namespace DdMd
21 {
22 
23  class Atom;
24  class AtomStorage;
25  class Buffer;
26  using namespace Util;
27 
34  {
35 
36  public:
37 
42 
46  virtual ~GroupExchanger();
47 
56  virtual
57  void markSpanningGroups(FMatrix<double, Dimension, 2>& bound,
60  IntVector& gridFlags) = 0;
61 
62  #ifdef UTIL_MPI
63 
74  virtual void pack(int i, int j, Buffer& buffer) = 0;
75 
86  virtual void unpack(Buffer& buffer, AtomStorage& atomStorage) = 0;
87  #endif // ifdef UTIL_MPI
88 
100  virtual
101  void markGhosts(AtomStorage& atomStorage,
102  FMatrix< GPArray<Atom>, Dimension, 2 >& sendArray,
103  IntVector& gridFlags) = 0;
104 
112  virtual void findGhosts(AtomStorage& atomStorage) = 0;
113 
126  #ifdef UTIL_MPI
127  virtual
128  bool isValid(AtomStorage& atomStorage, MPI::Intracomm& communicator,
129  bool hasGhosts) = 0;
130  #else
131  virtual
132  bool isValid(AtomStorage& atomStorage, bool hasGhosts) = 0;
133  #endif
134 
135  }; // class GroupExchanger
136 
137 } // namespace DdMd
138 #endif
const int Dimension
Dimensionality of space.
Definition: Dimension.h:19
File containing preprocessor macros for error handling.
Parallel domain decomposition (DD) MD simulation.
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
Interface for a GroupStorage<N> for use in Exchanger.
An IntVector is an integer Cartesian vector.
Definition: IntVector.h:73
An automatically growable PArray.
Definition: GPArray.h:28