| 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) | 
| 24 | 
  | 
  mpiPlug->numberProcessors = MPI::COMM_WORLD.Get_size(); | 
| 25 | 
  | 
  mpiPlug->myNode = worldRank; | 
| 26 | 
  | 
   | 
| 27 | 
+ | 
  mpiSim = this; | 
| 28 | 
+ | 
  wrapMe(); | 
| 29 | 
  | 
 | 
| 30 | 
  | 
} | 
| 31 | 
  | 
 | 
| 37 | 
  | 
   | 
| 38 | 
  | 
} | 
| 39 | 
  | 
 | 
| 40 | 
+ | 
void mpiSimulation::wrapMe(){ | 
| 41 | 
  | 
 | 
| 42 | 
+ | 
  wrapsimparallelmod_( wrapSimParallel ); | 
| 43 | 
+ | 
} | 
| 44 | 
+ | 
 | 
| 45 | 
+ | 
 | 
| 46 | 
+ | 
 | 
| 47 | 
  | 
void mpiSimulation::divideLabor( void ){ | 
| 48 | 
  | 
 | 
| 49 | 
  | 
  int nComponents; | 
| 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 | 
+ | 
} |