NAMD
MigrateAtomsMsg.h
Go to the documentation of this file.
1 
7 /*
8  Migration messages are sent from HomePatch to HomePatch
9  with lists of atoms and atom information (if any) that
10  need to be migrated. A message must be sent from a
11  neighbor even if null so that the HomePatch knows
12  what atoms it will have before commencing a positionsReady()
13  to its Computes.
14 */
15 
16 #ifndef MIGRATEATOMSMSG_H
17 #define MIGRATEATOMSMSG_H
18 
19 #include "charm++.h"
20 
21 #include "NamdTypes.h"
22 #include "SortedArray.h"
23 #include "Migration.h"
24 #include "PatchMgr.decl.h"
25 
26 // Message which stores list of atoms and their data
27 // which are to be migrated from one patch to another.
28 // This message does not contain information that will change asynchronously
29 // It does not need to be prepacked
30 class MigrateAtomsMsg : public CMessage_MigrateAtomsMsg {
31 public:
36 
37  MigrateAtomsMsg(void) { ; }
38 
39  // pack and unpack functions
40  static void* pack(MigrateAtomsMsg* msg);
41  static MigrateAtomsMsg* unpack(void *ptr);
42 };
43 
44 class MigrateAtomsCombinedMsg : public CMessage_MigrateAtomsCombinedMsg
45 {
46 public:
53 
56 
57  void add(PatchID source, PatchID destination, MigrationList &m);
58  void distribute(void);
59 
60  // pack and unpack functions
61  static void* pack(MigrateAtomsCombinedMsg *msg);
62  static MigrateAtomsCombinedMsg* unpack(void *ptr);
63 };
64 
65 #endif
66 
ResizeArray< int > numAtoms
ResizeArray< PatchID > destPatchID
static void * pack(MigrateAtomsMsg *msg)
MigrationList migrationList
void add(PatchID source, PatchID destination, MigrationList &m)
static MigrateAtomsMsg * unpack(void *ptr)
ResizeArray< PatchID > srcPatchID
int PatchID
Definition: NamdTypes.h:182
static MigrateAtomsCombinedMsg * unpack(void *ptr)
MigrationList migrationList
static void * pack(MigrateAtomsCombinedMsg *msg)
int NodeID
Definition: NamdTypes.h:184