11 |
|
class mpiSimulation{ |
12 |
|
public: |
13 |
|
|
14 |
< |
mpiSimulation(SimInfo* the_entryPlug); |
14 |
> |
mpiSimulation(MoleculeStamp** mol); |
15 |
|
~mpiSimulation(); |
16 |
|
|
17 |
|
void divideLabor(); |
18 |
|
|
19 |
< |
int getMyNode( void ) { return parallelData->myNode; } |
20 |
< |
int getNProcessors( void ) { return parallelData->nProcessors; } |
21 |
< |
int getNMolLocal( void ) { return parallelData->nMolLocal; } |
22 |
< |
int getNMolGlobal( void ) { return parallelData->nMolGlobal; } |
23 |
< |
int getNAtomsLocal( void ) { return parallelData->nAtomsLocal; } |
24 |
< |
int getNAtomsGlobal( void ) { return parallelData->nAtomsGlobal; } |
25 |
< |
int getNGroupsLocal( void ) { return parallelData->nGroupsLocal; } |
26 |
< |
int getNGroupsGlobal( void ) { return parallelData->nGroupsGlobal; } |
27 |
< |
int* getAtomToProcMap( void ) { return AtomToProcMap; } |
28 |
< |
int* getGroupToProcMap( void ) { return GroupToProcMap; } |
29 |
< |
int* getMolToProcMap( void ) { return MolToProcMap; } |
30 |
< |
int* getMolComponentType(void) { return MolComponentType; } |
31 |
< |
vector<int> getGlobalAtomIndex(void) {return globalAtomIndex; } |
32 |
< |
vector<int> getGlobalGroupIndex(void) {return globalGroupIndex; } |
33 |
< |
vector<int> getGlobalMolIndex(void) {return globalMolIndex;} |
34 |
< |
int getGlobalToLocalMol(int globalIndex) {return globalToLocalMol[globalIndex];} |
35 |
< |
int getGlobalToLocalAtom(int globalIndex) {return globalToLocalAtom[globalIndex];} |
36 |
< |
int getGlobalToLocalGroup(int globalIndex) {return globalToLocalGroup[globalIndex];} |
19 |
> |
int getMyNode() { return parallelData->myNode; } |
20 |
> |
int getNProcessors() { return parallelData->nProcessors; } |
21 |
> |
int getNMolLocal() { return parallelData->nMolLocal; } |
22 |
> |
int getNMolGlobal() { return parallelData->nMolGlobal; } |
23 |
> |
int getNAtomsLocal() { return parallelData->nAtomsLocal; } |
24 |
> |
int getNAtomsGlobal() { return parallelData->nAtomsGlobal; } |
25 |
> |
int getNGroupsLocal() { return parallelData->nGroupsLocal; } |
26 |
> |
int getNGroupsGlobal() { return parallelData->nGroupsGlobal; } |
27 |
> |
|
28 |
> |
int* getMolToProcMap() { return MolToProcMap; } |
29 |
|
|
30 |
+ |
vector<int> getGlobalAtomIndex() {return globalAtomIndex; } |
31 |
+ |
vector<int> getGlobalGroupIndex() {return globalGroupIndex; } |
32 |
+ |
vector<int> getGlobalMolIndex() {return globalMolIndex;} |
33 |
+ |
|
34 |
|
// call at the begining and after load balancing |
35 |
|
|
36 |
< |
void mpiRefresh( void ); |
36 |
> |
void mpiRefresh( ); |
37 |
|
|
38 |
|
protected: |
39 |
< |
SimInfo* entryPlug; |
39 |
> |
|
40 |
|
mpiSimData* parallelData; |
41 |
|
int *MolToProcMap; |
42 |
< |
int *MolComponentType; |
43 |
< |
int *AtomToProcMap; |
44 |
< |
int *AtomType; |
49 |
< |
int *GroupToProcMap; |
42 |
> |
|
43 |
> |
|
44 |
> |
|
45 |
|
vector<int> globalAtomIndex; |
46 |
|
vector<int> globalMolIndex; |
47 |
|
vector<int> globalGroupIndex; |
48 |
|
|
54 |
– |
vector<int> globalToLocalMol; |
55 |
– |
vector<int> globalToLocalAtom; |
56 |
– |
vector<int> globalToLocalGroup; |
57 |
– |
|
58 |
– |
// int *myIdents; // is needed by Cpp only. It tells the molecule which stamp it is. |
59 |
– |
|
49 |
|
}; |
50 |
|
|
62 |
– |
/** |
63 |
– |
The following pointer is the global declaration of the mpiSim |
64 |
– |
object created when the mpiSimulation creation routine is |
65 |
– |
called. Every one who includes the header file will then have |
66 |
– |
access to all of the routines in mpiSimulation class. |
67 |
– |
*/ |
68 |
– |
|
69 |
– |
extern mpiSimulation* mpiSim; |
70 |
– |
|
51 |
|
#endif |