00001 #ifndef _Stat_Coll__H 00002 #define _Stat_Coll__H 00003 #include "charm++.h" 00004 #include "amr.h" 00005 00006 class _DummyMsg : public CMessage__DummyMsg { 00007 public: 00008 00009 }; 00010 00011 class _CreateStatCollMsg: public CMessage__CreateStatCollMsg 00012 { 00013 public: 00014 CkChareID coordHandle; 00015 // _CreateStateCollMsg(){ }; 00016 _CreateStatCollMsg(CkChareID handle){ 00017 coordHandle = handle;} 00018 }; 00019 00020 class _StatCollMsg :public CMessage__StatCollMsg 00021 { 00022 public: 00023 int aRefineCount; 00024 int refineCount; 00025 int msgExpected; 00026 int migCount; 00027 int pnum; 00028 _StatCollMsg(){} 00029 _StatCollMsg(int ac, int rc, int msg, int mig, int pe){ 00030 aRefineCount = ac; 00031 refineCount = rc; 00032 msgExpected = msg; 00033 migCount = mig; 00034 pnum = pe; 00035 } 00036 }; 00037 00038 class StatCollector :public Group { 00039 private: 00040 int aRefineCount; 00041 int refineCount; 00042 int msgExpected; 00043 int migCount; 00044 //CProxy_AmrCoordinator coordProxy; 00045 CkChareID coordHandle; 00046 00047 public: 00048 StatCollector(){} 00049 StatCollector(_CreateStatCollMsg* m) { 00050 aRefineCount = 0; 00051 refineCount = 0; 00052 msgExpected = 0; 00053 migCount = 0; 00054 // coordProxy = CProxy_AmrCoordinator(m->coordHandle); 00055 coordHandle = m->coordHandle; 00056 delete m; 00057 } 00058 00059 void registerMe(void); 00060 void unRegisterMe(void); 00061 void migrating(); 00062 void incrementAutorefine(void); 00063 void incrementRefine(void); 00064 void sendStat(_DummyMsg *m); 00065 }; 00066 00067 #endif