ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-3.0/src/brains/mpiSimulation.hpp
Revision: 1619
Committed: Wed Oct 20 21:16:01 2004 UTC (19 years, 8 months ago) by chuckv
File size: 2435 byte(s)
Log Message:
Fortran/C++ interface de-obfuscation project appears to be complete!  Woo hoo!

File Contents

# Content
1 #ifndef __MPISIMULATION__
2 #define __MPISIMULATION__
3
4 #include "brains/SimInfo.hpp"
5 #include "types/MakeStamps.hpp"
6 #define __C
7 #include "UseTheForce/mpiComponentPlan.h"
8
9 #include "UseTheForce/DarkSide/simParallel_interface.h"
10
11 class mpiSimulation{
12 public:
13
14 mpiSimulation(SimInfo* the_entryPlug);
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];}
37
38 // call at the begining and after load balancing
39
40 void mpiRefresh( void );
41
42 protected:
43 SimInfo* entryPlug;
44 mpiSimData* parallelData;
45 int *MolToProcMap;
46 int *MolComponentType;
47 int *AtomToProcMap;
48 int *AtomType;
49 int *GroupToProcMap;
50 vector<int> globalAtomIndex;
51 vector<int> globalMolIndex;
52 vector<int> globalGroupIndex;
53
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
60 };
61
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
71 #endif