2 |
|
#define __MPISIMULATION__ |
3 |
|
|
4 |
|
#include "SimInfo.hpp" |
5 |
+ |
#include "MakeStamps.hpp" |
6 |
+ |
#define __C |
7 |
+ |
#include "mpiComponentPlan.h" |
8 |
|
|
9 |
|
|
10 |
|
class mpiSimulation{ |
13 |
|
mpiSimulation(SimInfo* the_entryPlug); |
14 |
|
~mpiSimulation(); |
15 |
|
|
16 |
< |
void divideLabor(int nComponents, MoleculeStamp** compStamps, int* componentsNmol ); |
16 |
> |
void divideLabor( void ); |
17 |
|
|
18 |
< |
int getMyNode(void) {return myNode;} |
18 |
> |
int getMyNode(void) { return mpiPlug->myNode; } |
19 |
> |
int getNumberProcessors(void) { return mpiPlug->numberProcessors; } |
20 |
> |
int getMyMolStart( void ) { return mpiPlug->myMolStart; } |
21 |
> |
int getMyMolEnd( void ) { return mpiPlug->myMolEnd; } |
22 |
> |
int getMyMol( void ) { return mpiPlug->myMol; } |
23 |
> |
int getMyAtomStart( void ) { return mpiPlug->myAtomStart; } |
24 |
> |
int getMyAtomEnd( void ) { return mpiPlug->myAtomEnd; } |
25 |
> |
int getMyNlocal( void ) { return mpiPlug->myNlocal; } |
26 |
> |
int getTotAtoms( void ) { return mpiPlug->nAtomsGlobal; } |
27 |
|
|
17 |
– |
|
28 |
|
|
29 |
+ |
// sets the internal function pointer to fortran. |
30 |
+ |
|
31 |
+ |
void setInternal( void (*fSetup)( mpiSimData*, int*, int*, int*) ){ |
32 |
+ |
setFsimParallel = fSetup; |
33 |
+ |
} |
34 |
+ |
|
35 |
|
private: |
36 |
|
|
37 |
|
protected: |
38 |
|
SimInfo* entryPlug; |
39 |
+ |
mpiSimData* mpiPlug; |
40 |
+ |
|
41 |
+ |
// function to wrap the fortran function |
42 |
+ |
void wrapMe(); |
43 |
|
|
44 |
< |
int myMolStart; |
45 |
< |
int myMolEnd; |
46 |
< |
int myMol; |
27 |
< |
int numberProcessors; |
28 |
< |
int myNode; |
29 |
< |
// int processorNameLen; |
30 |
< |
// char* processorName; |
31 |
< |
int natomsRow,natomsCol,natomsStart,natomsEnd; |
32 |
< |
int numberCols,numberRows; |
33 |
< |
int nmolsRow,nmolsCol,nmolsLocal; |
34 |
< |
|
44 |
> |
// private function to initialize the fortran side of the simulation |
45 |
> |
void (*setFsimParallel)(mpiSimData* the_mpiPlug, int *nLocal, |
46 |
> |
int* globalIndex, int* isError ); |
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 mnpiSimulation class. |
58 |
+ |
*/ |
59 |
+ |
|
60 |
+ |
extern mpiSimulation* mpiSim; |
61 |
+ |
|
62 |
|
#endif |