ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/mpiSimulation.hpp
Revision: 1203
Committed: Thu May 27 18:59:17 2004 UTC (20 years, 3 months ago) by gezelter
File size: 2632 byte(s)
Log Message:
Cutoff group changes under MPI

File Contents

# User Rev Content
1 mmeineke 377 #ifndef __MPISIMULATION__
2     #define __MPISIMULATION__
3    
4     #include "SimInfo.hpp"
5     #include "MakeStamps.hpp"
6     #define __C
7     #include "mpiComponentPlan.h"
8    
9     #include "fortranWrapDefines.hpp"
10    
11     class mpiSimulation{
12     public:
13    
14     mpiSimulation(SimInfo* the_entryPlug);
15     ~mpiSimulation();
16    
17 tim 1108 void divideLabor();
18 mmeineke 377
19 gezelter 1203 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 gezelter 419 int* getAtomToProcMap( void ) { return AtomToProcMap; }
28 gezelter 1203 int* getGroupToProcMap( void ) { return GroupToProcMap; }
29 mmeineke 422 int* getMolToProcMap( void ) { return MolToProcMap; }
30     int* getMolComponentType(void) { return MolComponentType; }
31 tim 1108 vector<int> getGlobalAtomIndex(void) {return globalAtomIndex; }
32 gezelter 1203 vector<int> getGlobalGroupIndex(void) {return globalGroupIndex; }
33 tim 1108 vector<int> getGlobalMolIndex(void) {return globalMolIndex;}
34     int getGlobalToLocalMol(int globalIndex) {return globalToLocalMol[globalIndex];}
35     int getGlobalToLocalAtom(int globalIndex) {return globalToLocalAtom[globalIndex];}
36 gezelter 1203 int getGlobalToLocalGroup(int globalIndex) {return globalToLocalGroup[globalIndex];}
37 tim 1108
38 mmeineke 377 // sets the internal function pointer to fortran.
39    
40 mmeineke 836 void setInternal( setFortranMPI_TD fSetup){
41 mmeineke 377 setFsimParallel = fSetup;
42     }
43    
44    
45     // call at the begining and after load balancing
46    
47     void mpiRefresh( void );
48    
49     protected:
50     SimInfo* entryPlug;
51 gezelter 1203 mpiSimData* parallelData;
52 gezelter 405 int *MolToProcMap;
53     int *MolComponentType;
54     int *AtomToProcMap;
55     int *AtomType;
56 gezelter 1203 int *GroupToProcMap;
57 tim 1108 vector<int> globalAtomIndex;
58     vector<int> globalMolIndex;
59 gezelter 1203 vector<int> globalGroupIndex;
60 gezelter 405
61 tim 1108 vector<int> globalToLocalMol;
62     vector<int> globalToLocalAtom;
63 gezelter 1203 vector<int> globalToLocalGroup;
64    
65 mmeineke 377 // private function to initialize the fortran side of the simulation
66 mmeineke 836 setFortranMPI_TD setFsimParallel;
67 mmeineke 377
68     // int *myIdents; // is needed by Cpp only. It tells the molecule which stamp it is.
69    
70     };
71    
72    
73     /**
74     The following pointer is the global declaration of the mpiSim
75     object created when the mpiSimulation creation routine is
76     called. Every one who includes the header file will then have
77     access to all of the routines in mpiSimulation class.
78     */
79    
80     extern mpiSimulation* mpiSim;
81    
82     #endif