1 |
|
#define __C |
2 |
+ |
|
3 |
+ |
#include "config.h" |
4 |
|
#include "fSimulation.h" |
5 |
< |
#include <fortranWrappers.hpp> |
5 |
> |
#include "fortranWrappers.hpp" |
6 |
|
|
7 |
+ |
extern "C"{ |
8 |
|
|
9 |
< |
extern "C" { |
10 |
< |
|
11 |
< |
void wrapforcefield_( void (*wrapFunction)( void (*p1) makeAtypeList, |
12 |
< |
void (*p2) initFortranFFList, |
13 |
< |
void (*p3) doForceLoopList, |
14 |
< |
void (*p4) set_sticky_params_List, |
15 |
< |
void (*p5) set_gb_pair_params_List ) |
13 |
< |
); |
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 |
< |
void (*p3) notifyFortranCutOffList) ); |
20 |
< |
|
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 |
22 |
– |
|
25 |
|
} |
26 |
|
|
25 |
– |
|
27 |
|
void wrapFF( void (*p1) makeAtypeList, void (*p2) initFortranFFList, |
28 |
|
void (*p3) doForceLoopList, void (*p4) set_sticky_params_List, |
29 |
< |
void (*p5) set_gb_pair_params_List ); |
29 |
> |
void (*p5) set_gb_pair_params_List, void (*p6) newEAMtype_List); |
30 |
|
void (*makeAtype) makeAtypeList; |
31 |
|
void (*initFortranFF) initFortranFFList; |
32 |
|
void (*set_sticky_params) set_sticky_params_List; |
33 |
|
void (*set_gb_pair_params) set_gb_pair_params_List; |
34 |
+ |
void (*newEAMtype) newEAMtype_List; |
35 |
|
|
36 |
|
void wrapSimInfo( void (*p1) setFortranSimList, void (*p2) setFortranBoxList, |
37 |
|
void (*p3) notifyFortranCutOffList ); |
47 |
|
void wrapMeFF( ForceFields* thisFF ){ |
48 |
|
|
49 |
|
currentFF = thisFF; |
50 |
< |
wrapforcefield_( wrapFF ); |
50 |
> |
F90_FUNC(wrapforcefield, WRAPFORCEFIELD)( wrapFF ); |
51 |
|
} |
50 |
– |
|
52 |
|
|
53 |
+ |
|
54 |
|
void wrapFF( void (*p1) makeAtypeList, void (*p2) initFortranFFList, |
55 |
|
void (*p3) doForceLoopList, void (*p4) set_sticky_params_List, |
56 |
< |
void (*p5) set_gb_pair_params_List ){ |
56 |
> |
void (*p5) set_gb_pair_params_List, void (*p6) newEAMtype_List){ |
57 |
|
|
58 |
|
makeAtype = p1; |
59 |
|
initFortranFF = p2; |
60 |
|
currentFF->setFortranForceLoop( p3 ); |
61 |
|
set_sticky_params = p4; |
62 |
|
set_gb_pair_params = p5; |
63 |
< |
|
63 |
> |
newEAMtype = p6; |
64 |
> |
|
65 |
|
} |
66 |
|
|
67 |
|
|
71 |
|
void wrapMeSimInfo( SimInfo* thePlug ){ |
72 |
|
|
73 |
|
currentPlug = thePlug; |
74 |
< |
wrapsimmod_( wrapSimInfo ); |
74 |
> |
F90_FUNC(wrapsimmod, WRAPSIMMOD) ( wrapSimInfo ); |
75 |
|
} |
76 |
|
|
77 |
|
void wrapSimInfo( void (*p1) setFortranSimList, void (*p2) setFortranBoxList, |
79 |
|
|
80 |
|
currentPlug->setInternal( p1, p2, p3 ); |
81 |
|
} |
79 |
– |
|
82 |
|
|
83 |
+ |
|
84 |
|
#ifdef IS_MPI |
85 |
|
|
86 |
|
// wrap the mpiSim functions |
89 |
|
void wrapMeSimParallel( mpiSimulation* thisMPIsim ){ |
90 |
|
|
91 |
|
currentMPIsim = thisMPIsim; |
92 |
< |
wrapsimparallelmod_( wrapSimParallel ); |
92 |
> |
F90_FUNC(wrapsimparallelmod, WRAPSIMPARALLELMOD) ( wrapSimParallel ); |
93 |
|
} |
94 |
|
|
95 |
|
void wrapSimParallel(void (*p1) setFortranMPIlist ){ |
99 |
|
|
100 |
|
|
101 |
|
#endif // is_mpi |
102 |
+ |
|