4 |
|
|
5 |
|
extern "C" { |
6 |
|
|
7 |
< |
void wrapforcefield_( void (*wrapFunction)( void (*p1), |
8 |
< |
void (*p2)( int *nLocal, |
9 |
< |
int *identArray, |
10 |
< |
int *isError ), |
11 |
< |
void (*p3)( double* positionArray, |
12 |
< |
double* forceArray, |
13 |
< |
double* potentialEnergy, |
14 |
< |
double* tau, |
15 |
< |
short int* doPotentialCalc, |
16 |
< |
int* isError))); |
17 |
< |
} |
7 |
> |
void wrapforcefield_( void (*wrapFunction)( void (*p1) newAtypeList, |
8 |
> |
void (*p2) initFortranList, |
9 |
> |
void (*p3) doForceLoopList )); |
10 |
> |
|
11 |
> |
void wrapsimmod_ ( void (*wrapFunction)( void (*p1) setFortranSimList ) ); |
12 |
|
|
13 |
+ |
#ifdef IS_MPI |
14 |
+ |
void wrapsimparallelmod_( void (*wrapFunction)(void (*p1) setFortranMPIlist ) ); |
15 |
+ |
#endif // is_mpi |
16 |
|
|
17 |
< |
void functionWrapperFF( void (*p1) newAtypeList, void (*p2) initFortranList, |
21 |
< |
void (*p3) doForceLoopList ); |
17 |
> |
} |
18 |
|
|
19 |
+ |
|
20 |
+ |
void wrapFF( void (*p1) newAtypeList, void (*p2) initFortranList, |
21 |
+ |
void (*p3) doForceLoopList ); |
22 |
|
void (*newAtype) newAtypeList; |
23 |
+ |
void (*initFortranFF) initFortranList; |
24 |
|
|
25 |
< |
void (*initTPEfortran) initFortranList; |
25 |
> |
void wrapSimInfo( void (*p1) setFortranSimList ); |
26 |
> |
|
27 |
> |
#ifdef IS_MPI |
28 |
> |
void wrapSimParallel(void (*p1) setFortranMPIlist ); |
29 |
> |
#endif // is_mpi |
30 |
> |
|
31 |
> |
|
32 |
> |
// take care of the ForceField functions |
33 |
> |
|
34 |
> |
ForceFields* currentFF; |
35 |
> |
void wrapMeFF( ForceFields* thisFF ){ |
36 |
> |
|
37 |
> |
currentFF = thisFF; |
38 |
> |
wrapforcefield_( wrapFF ); |
39 |
> |
} |
40 |
> |
|
41 |
> |
|
42 |
> |
void wrapFF( void (*p1) newAtypeList, void (*p2) initFortranList, |
43 |
> |
void (*p3) doForceLoopList ){ |
44 |
> |
|
45 |
> |
newAtype = p1; |
46 |
> |
initFortranFF = p2; |
47 |
> |
currentFF->setFortranForceLoop( p3 ); |
48 |
> |
} |
49 |
> |
|
50 |
> |
|
51 |
> |
// wrap the SimInfo functions |
52 |
> |
|
53 |
> |
SimInfo* currentPlug |
54 |
> |
void wrapMeSimInfo( SimInfo* thePlug ){ |
55 |
> |
|
56 |
> |
currentPlug = thePlug; |
57 |
> |
wrapsimmod_( wrapSimInfo ); |
58 |
> |
} |
59 |
> |
|
60 |
> |
void wrapSimInfo( void (*p1) setFortranSimList ){ |
61 |
> |
|
62 |
> |
currentPlug->setInternal( p1 ); |
63 |
> |
} |
64 |
> |
|
65 |
> |
|
66 |
> |
#ifdef IS_MPI |
67 |
> |
|
68 |
> |
// wrap the mpiSim functions |
69 |
> |
|
70 |
> |
mpiSimulation* currentMPIsim; |
71 |
> |
void wrapMeSimParallel( mpiSimulation* thisMPIsim ){ |
72 |
> |
|
73 |
> |
currentMPIsim = thisMPIsim; |
74 |
> |
wrapsimparallelmod_( wrapSimParallel ); |
75 |
> |
} |
76 |
> |
|
77 |
> |
void wrapSimParallel(void (*p1) setFortranMPIlist ){ |
78 |
> |
|
79 |
> |
currentMPIsim->setInternal( p1 ); |
80 |
> |
} |
81 |
> |
|
82 |
> |
|
83 |
> |
#endif // is_mpi |