ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/mpiSimulation.hpp
Revision: 836
Committed: Tue Oct 28 22:25:46 2003 UTC (20 years, 8 months ago) by mmeineke
File size: 1732 byte(s)
Log Message:
did a complete overhaul of how c calls fortran. All function pointers and fortran calls are rigidly typecast now.

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 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    
29 mmeineke 377 // sets the internal function pointer to fortran.
30    
31 mmeineke 836 void setInternal( setFortranMPI_TD fSetup){
32 mmeineke 377 setFsimParallel = fSetup;
33     }
34    
35    
36     // call at the begining and after load balancing
37    
38     void mpiRefresh( void );
39    
40     protected:
41     SimInfo* entryPlug;
42     mpiSimData* mpiPlug;
43 gezelter 405 int *MolToProcMap;
44     int *MolComponentType;
45     int *AtomToProcMap;
46     int *AtomType;
47    
48 mmeineke 377 // private function to initialize the fortran side of the simulation
49 mmeineke 836 setFortranMPI_TD setFsimParallel;
50 mmeineke 377
51     // int *myIdents; // is needed by Cpp only. It tells the molecule which stamp it is.
52    
53     };
54    
55    
56     /**
57     The following pointer is the global declaration of the mpiSim
58     object created when the mpiSimulation creation routine is
59     called. Every one who includes the header file will then have
60     access to all of the routines in mpiSimulation class.
61     */
62    
63     extern mpiSimulation* mpiSim;
64    
65     #endif