ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/mdtools/mpi_implementation/mpiSimulation.cpp
(Generate patch)

Comparing trunk/mdtools/mpi_implementation/mpiSimulation.cpp (file contents):
Revision 244 by chuckv, Thu Dec 19 21:59:51 2002 UTC vs.
Revision 245 by mmeineke, Fri Jan 24 21:25:08 2003 UTC

# Line 5 | Line 5 | mpiSimulation* mpiSim;
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 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines