5 |
|
|
6 |
|
#include "mpiSimulation.hpp" |
7 |
|
#include "simError.h" |
8 |
+ |
#include <fortranWrappers.hpp> |
9 |
|
|
9 |
– |
extern "C"{ |
10 |
– |
void wrapsimparallelmod_( void (*wrapFunction)(void (*fSub)( mpiSimData*, |
11 |
– |
int*, int*, |
12 |
– |
int*))); |
13 |
– |
} |
10 |
|
|
15 |
– |
void wrapSimParallel(void (*fSub)(mpiSimData*, int*, int*, int*)); |
11 |
|
|
12 |
|
|
13 |
|
mpiSimulation* mpiSim; |
21 |
|
mpiPlug->myNode = worldRank; |
22 |
|
|
23 |
|
mpiSim = this; |
24 |
< |
wrapMe(); |
30 |
< |
|
24 |
> |
wrapMeSimParallel( this ); |
25 |
|
} |
26 |
|
|
27 |
|
|
32 |
|
|
33 |
|
} |
34 |
|
|
41 |
– |
void mpiSimulation::wrapMe(){ |
35 |
|
|
43 |
– |
wrapsimparallelmod_( wrapSimParallel ); |
44 |
– |
} |
36 |
|
|
46 |
– |
|
47 |
– |
|
37 |
|
int* mpiSimulation::divideLabor( void ){ |
38 |
|
|
39 |
|
int* globalIndex; |
187 |
|
} |
188 |
|
|
189 |
|
|
201 |
– |
void wrapSimParallel(void (*fSub)(mpiSimData*, int*, int*, int*)){ |
202 |
– |
|
203 |
– |
mpiSim->setInternal( fSub ); |
204 |
– |
} |
205 |
– |
|
206 |
– |
|
190 |
|
void mpiSimulation::mpiRefresh( void ){ |
191 |
|
|
192 |
|
int isError, i; |