1 |
#include <cstdlib> |
2 |
|
3 |
#include "SimInfo.hpp" |
4 |
#define __C |
5 |
#include "fSimulation.h" |
6 |
extern "C"{ |
7 |
void wrapsimmod_( void (*wrapFunction)(void (*fSub)( int*, double*, |
8 |
double*, double*))); |
9 |
} |
10 |
|
11 |
void wrapSimInfo(void (*fSub)( int*, double*, double*, double*)); |
12 |
|
13 |
SimInfo* currentInfo; |
14 |
|
15 |
SimInfo::SimInfo(){ |
16 |
excludes = NULL; |
17 |
n_constraints = 0; |
18 |
n_oriented = 0; |
19 |
n_dipoles = 0; |
20 |
the_integrator = NULL; |
21 |
setTemp = 0; |
22 |
thermalTime = 0.0; |
23 |
|
24 |
currentInfo = this; |
25 |
wrapMe(); |
26 |
} |
27 |
|
28 |
|
29 |
void SimInfo::wrapMe(){ |
30 |
|
31 |
wrapsimmod_( wrapSimInfo ); |
32 |
} |
33 |
|
34 |
|
35 |
void SimInfo::refreshSim(){ |
36 |
|
37 |
double box[3]; |
38 |
|
39 |
box[0] = box_x; |
40 |
box[1] = box_y; |
41 |
box[2] = box_z; |
42 |
|
43 |
|
44 |
|
45 |
setFsimulation( &n_atoms, box, &rList, &rCut,&ensemble, |
46 |
&mixingRule,&usePBC); |
47 |
} |
48 |
|
49 |
|
50 |
void wrapSimInfo(void (*fSub)( int*, double*, double*, double*)){ |
51 |
|
52 |
currentInfo->setInternal(fSub); |
53 |
} |