ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/mpiSimulation.hpp
Revision: 377
Committed: Fri Mar 21 17:42:12 2003 UTC (21 years, 3 months ago) by mmeineke
Original Path: branches/mmeineke/OOPSE/libmdtools/mpiSimulation.hpp
File size: 1681 byte(s)
Log Message:
New OOPSE Tree

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     int *divideLabor( void );
18    
19     int getMyNode(void) { return mpiPlug->myNode; }
20     int getNumberProcessors(void) { return mpiPlug->numberProcessors; }
21     int getMyMolStart( void ) { return mpiPlug->myMolStart; }
22     int getMyMolEnd( void ) { return mpiPlug->myMolEnd; }
23     int getMyMol( void ) { return mpiPlug->myMol; }
24     int getMyAtomStart( void ) { return mpiPlug->myAtomStart; }
25     int getMyAtomEnd( void ) { return mpiPlug->myAtomEnd; }
26     int getMyNlocal( void ) { return mpiPlug->myNlocal; }
27     int getTotAtoms( void ) { return mpiPlug->nAtomsGlobal; }
28    
29    
30     // sets the internal function pointer to fortran.
31    
32     void setInternal( void (*fSetup) setFortranMPIlist ){
33     setFsimParallel = fSetup;
34     }
35    
36    
37     // call at the begining and after load balancing
38    
39     void mpiRefresh( void );
40    
41     protected:
42     SimInfo* entryPlug;
43     mpiSimData* mpiPlug;
44    
45     // private function to initialize the fortran side of the simulation
46     void (*setFsimParallel) setFortranMPIlist;
47    
48     // int *myIdents; // is needed by Cpp only. It tells the molecule which stamp it is.
49    
50     };
51    
52    
53     /**
54     The following pointer is the global declaration of the mpiSim
55     object created when the mpiSimulation creation routine is
56     called. Every one who includes the header file will then have
57     access to all of the routines in mpiSimulation class.
58     */
59    
60     extern mpiSimulation* mpiSim;
61    
62     #endif