# | Line 5 | Line 5 | i#include <cstdlib> | |
---|---|---|
5 | #include "mpiSimulation.hpp" | |
6 | #include "simError.h" | |
7 | ||
8 | + | extern "C"{ |
9 | + | void wrapsimparallelmod_( void (*wrapFunction)(void (*fSub)( mpiSimData*, |
10 | + | int*, int*, |
11 | + | int*))); |
12 | + | } |
13 | + | |
14 | + | void wrapSimParallel((void (*fSub)(mpiSimData*, int*, int*, int*))); |
15 | + | |
16 | + | |
17 | mpiSimulation* mpiSim; | |
18 | ||
19 | mpiSimulation::mpiSimulation(SimInfo* the_entryPlug) | |
# | Line 15 | Line 24 | mpiSimulation::mpiSimulation(SimInfo* the_entryPlug) | |
24 | mpiPlug->numberProcessors = MPI::COMM_WORLD.Get_size(); | |
25 | mpiPlug->myNode = worldRank; | |
26 | ||
27 | + | mpiSim = this; |
28 | + | wrapMe(); |
29 | ||
30 | } | |
31 | ||
# | Line 26 | Line 37 | mpiSimulation::~mpiSimulation(){ | |
37 | ||
38 | } | |
39 | ||
40 | + | void mpiSimulation::wrapMe(){ |
41 | ||
42 | + | wrapsimparallelmod_( wrapSimParallel ); |
43 | + | } |
44 | + | |
45 | + | |
46 | + | |
47 | void mpiSimulation::divideLabor( void ){ | |
48 | ||
49 | int nComponents; | |
# | Line 167 | Line 184 | void mpiSimulation::divideLabor( void ){ | |
184 | ||
185 | // lets create the identity array | |
186 | } | |
187 | + | |
188 | + | |
189 | + | void wrapSimParallel((void (*fSub)(mpiSimData*, int*, int*, int*))){ |
190 | + | |
191 | + | mpiSim->setInternal( fSub ); |
192 | + | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |