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