1 |
#define __C |
2 |
|
3 |
#include "config.h" |
4 |
#include "fSimulation.h" |
5 |
#include "fortranWrappers.hpp" |
6 |
|
7 |
|
8 |
|
9 |
extern void F90_FUNC(wrapforcefield, WRAPFORCEFIELD) (void (*wrapFunction)(void (*p1) makeAtypeList, |
10 |
void (*p2) initFortranFFList, |
11 |
void (*p3) doForceLoopList, |
12 |
void (*p4) set_sticky_params_List, |
13 |
void (*p5) set_gb_pair_params_List, |
14 |
void (*p6) newEAMtype_List) |
15 |
); |
16 |
|
17 |
extern void F90_FUNC(wrapsimmod, WRAPSIMMOD) (void (*wrapFunction)(void (*p1) setFortranSimList, |
18 |
void (*p2) setFortranBoxList, |
19 |
void (*p3) notifyFortranCutOffList) |
20 |
); |
21 |
|
22 |
#ifdef IS_MPI |
23 |
extern void F90_FUNC(wrapsimparallelmod, WRAPSIMPARALLELMOD) (void (*wrapFunction)(void (*p1) setFortranMPIlist) ); |
24 |
#endif // is_mpi |
25 |
|
26 |
void wrapFF( void (*p1) makeAtypeList, void (*p2) initFortranFFList, |
27 |
void (*p3) doForceLoopList, void (*p4) set_sticky_params_List, |
28 |
void (*p5) set_gb_pair_params_List, void (*p6) newEAMtype_List); |
29 |
void (*makeAtype) makeAtypeList; |
30 |
void (*initFortranFF) initFortranFFList; |
31 |
void (*set_sticky_params) set_sticky_params_List; |
32 |
void (*set_gb_pair_params) set_gb_pair_params_List; |
33 |
void (*newEAMtype) newEAMtype_List; |
34 |
|
35 |
void wrapSimInfo( void (*p1) setFortranSimList, void (*p2) setFortranBoxList, |
36 |
void (*p3) notifyFortranCutOffList ); |
37 |
|
38 |
#ifdef IS_MPI |
39 |
void wrapSimParallel(void (*p1) setFortranMPIlist ); |
40 |
#endif // is_mpi |
41 |
|
42 |
|
43 |
// take care of the ForceField functions |
44 |
|
45 |
ForceFields* currentFF; |
46 |
void wrapMeFF( ForceFields* thisFF ){ |
47 |
|
48 |
currentFF = thisFF; |
49 |
F90_FUNC(wrapforcefield, WRAPFORCEFIELD)( wrapFF ); |
50 |
} |
51 |
|
52 |
|
53 |
void wrapFF( void (*p1) makeAtypeList, void (*p2) initFortranFFList, |
54 |
void (*p3) doForceLoopList, void (*p4) set_sticky_params_List, |
55 |
void (*p5) set_gb_pair_params_List, void (*p6) newEAMtype_List){ |
56 |
|
57 |
makeAtype = p1; |
58 |
initFortranFF = p2; |
59 |
currentFF->setFortranForceLoop( p3 ); |
60 |
set_sticky_params = p4; |
61 |
set_gb_pair_params = p5; |
62 |
newEAMtype = p6; |
63 |
|
64 |
} |
65 |
|
66 |
|
67 |
// wrap the SimInfo functions |
68 |
|
69 |
SimInfo* currentPlug; |
70 |
void wrapMeSimInfo( SimInfo* thePlug ){ |
71 |
|
72 |
currentPlug = thePlug; |
73 |
F90_FUNC(wrapsimmod, WRAPSIMMOD) ( wrapSimInfo ); |
74 |
} |
75 |
|
76 |
void wrapSimInfo( void (*p1) setFortranSimList, void (*p2) setFortranBoxList, |
77 |
void (*p3) notifyFortranCutOffList){ |
78 |
|
79 |
currentPlug->setInternal( p1, p2, p3 ); |
80 |
} |
81 |
|
82 |
|
83 |
#ifdef IS_MPI |
84 |
|
85 |
// wrap the mpiSim functions |
86 |
|
87 |
mpiSimulation* currentMPIsim; |
88 |
void wrapMeSimParallel( mpiSimulation* thisMPIsim ){ |
89 |
|
90 |
currentMPIsim = thisMPIsim; |
91 |
F90_FUNC(wrapsimparallelmod, WRAPSIMPARALLELMOD) ( wrapSimParallel ); |
92 |
} |
93 |
|
94 |
void wrapSimParallel(void (*p1) setFortranMPIlist ){ |
95 |
|
96 |
currentMPIsim->setInternal( p1 ); |
97 |
} |
98 |
|
99 |
|
100 |
#endif // is_mpi |
101 |
|