ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/mpiSimulation.hpp
Revision: 1108
Committed: Wed Apr 14 15:37:41 2004 UTC (20 years, 2 months ago) by tim
File size: 2303 byte(s)
Log Message:
Change DumpWriter and InitFromFile

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     int getMyNode(void) { return mpiPlug->myNode; }
20     int getNumberProcessors(void) { return mpiPlug->numberProcessors; }
21 gezelter 405 int getMyNMol( void ) { return mpiPlug->myNMol; }
22 mmeineke 377 int getMyNlocal( void ) { return mpiPlug->myNlocal; }
23     int getTotAtoms( void ) { return mpiPlug->nAtomsGlobal; }
24 mmeineke 422 int getTotNmol( void ) { return mpiPlug->nMolGlobal; }
25 gezelter 419 int* getAtomToProcMap( void ) { return AtomToProcMap; }
26 mmeineke 422 int* getMolToProcMap( void ) { return MolToProcMap; }
27     int* getMolComponentType(void) { return MolComponentType; }
28 tim 1108 vector<int> getGlobalAtomIndex(void) {return globalAtomIndex; }
29     vector<int> getGlobalMolIndex(void) {return globalMolIndex;}
30     int getGlobalToLocalMol(int globalIndex) {return globalToLocalMol[globalIndex];}
31     int getGlobalToLocalAtom(int globalIndex) {return globalToLocalAtom[globalIndex];}
32    
33    
34     //void globalToLocalMol(int globalIndex, int& whichNode, int& localIndex);
35     //void globalToLocalAtom(int globalIndex, int& whichNode, int& localIndex);
36    
37 mmeineke 377 // sets the internal function pointer to fortran.
38    
39 mmeineke 836 void setInternal( setFortranMPI_TD fSetup){
40 mmeineke 377 setFsimParallel = fSetup;
41     }
42    
43    
44     // call at the begining and after load balancing
45    
46     void mpiRefresh( void );
47    
48     protected:
49     SimInfo* entryPlug;
50     mpiSimData* mpiPlug;
51 gezelter 405 int *MolToProcMap;
52     int *MolComponentType;
53     int *AtomToProcMap;
54     int *AtomType;
55 tim 1108 vector<int> globalAtomIndex;
56     vector<int> globalMolIndex;
57 gezelter 405
58 tim 1108 vector<int> globalToLocalMol;
59     vector<int> globalToLocalAtom;
60 mmeineke 377 // private function to initialize the fortran side of the simulation
61 mmeineke 836 setFortranMPI_TD setFsimParallel;
62 mmeineke 377
63     // int *myIdents; // is needed by Cpp only. It tells the molecule which stamp it is.
64    
65     };
66    
67    
68     /**
69     The following pointer is the global declaration of the mpiSim
70     object created when the mpiSimulation creation routine is
71     called. Every one who includes the header file will then have
72     access to all of the routines in mpiSimulation class.
73     */
74    
75     extern mpiSimulation* mpiSim;
76    
77     #endif