MigrateAtomsMsg.h

Go to the documentation of this file.
00001 
00007 /*
00008    Migration messages are sent from HomePatch to HomePatch
00009    with lists of atoms and atom information (if any) that
00010    need to be migrated.  A message must be sent from a
00011    neighbor even if null so that the HomePatch knows
00012    what atoms it will have before commencing a positionsReady()
00013    to its Computes.
00014 */
00015 
00016 #ifndef MIGRATEATOMSMSG_H
00017 #define MIGRATEATOMSMSG_H
00018 
00019 #include "charm++.h"
00020 
00021 #include "NamdTypes.h"
00022 #include "SortedArray.h"
00023 #include "Migration.h"
00024 #include "PatchMgr.decl.h"
00025 
00026 // Message which stores list of atoms and their data
00027 // which are to be migrated from one patch to another.
00028 // This message does not contain information that will change asynchronously
00029 // It does not need to be prepacked
00030 class MigrateAtomsMsg : public CMessage_MigrateAtomsMsg {
00031 public:
00032   NodeID  fromNodeID;
00033   PatchID srcPatchID;
00034   PatchID destPatchID;
00035   MigrationList migrationList;
00036 
00037   MigrateAtomsMsg(void) { ; }
00038 
00039   // pack and unpack functions
00040   static void* pack(MigrateAtomsMsg* msg);
00041   static MigrateAtomsMsg* unpack(void *ptr);
00042 };
00043 
00044 class MigrateAtomsCombinedMsg : public CMessage_MigrateAtomsCombinedMsg
00045 {
00046 public:
00047   NodeID fromNodeID;
00048   ResizeArray<PatchID> srcPatchID;
00049   ResizeArray<PatchID> destPatchID;
00050   ResizeArray<int> numAtoms;
00051   int totalAtoms;
00052   MigrationList migrationList;
00053 
00054   MigrateAtomsCombinedMsg(void);
00055   ~MigrateAtomsCombinedMsg(void) { };
00056 
00057   void add(PatchID source, PatchID destination, MigrationList &m);
00058   void distribute(void);
00059 
00060   // pack and unpack functions
00061   static void* pack(MigrateAtomsCombinedMsg *msg);
00062   static MigrateAtomsCombinedMsg* unpack(void *ptr);
00063 };
00064 
00065 #endif
00066 

Generated on Wed Nov 22 01:17:15 2017 for NAMD by  doxygen 1.4.7