| 1 |
mmeineke |
243 |
#include <cstdlib> |
| 2 |
|
|
|
| 3 |
|
|
#include "SimInfo.hpp" |
| 4 |
|
|
|
| 5 |
|
|
extern "C"{ |
| 6 |
|
|
void wrapsimmod_( void (*wrapFunction)(void (*fSub)( int*, double*, |
| 7 |
|
|
double*, double*))); |
| 8 |
|
|
} |
| 9 |
|
|
|
| 10 |
|
|
void wrapSimInfo((void (*fSub)( int*, double*, double*, double*))); |
| 11 |
|
|
|
| 12 |
|
|
SimInfo* currentInfo; |
| 13 |
|
|
|
| 14 |
|
|
SimInfo::SimInfo(){ |
| 15 |
|
|
excludes = NULL; |
| 16 |
|
|
n_constraints = 0; |
| 17 |
|
|
n_oriented = 0; |
| 18 |
|
|
n_dipoles = 0; |
| 19 |
|
|
longRange = NULL; |
| 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 |
|
|
void SimInfo::refreshSim(){ |
| 35 |
|
|
|
| 36 |
|
|
double box[3]; |
| 37 |
|
|
|
| 38 |
|
|
box[0] = box_x; |
| 39 |
|
|
box[1] = box_y; |
| 40 |
|
|
box[2] = box_z; |
| 41 |
|
|
|
| 42 |
|
|
setFsimulation( &n_atoms, box, &rList, &rCut ); |
| 43 |
|
|
} |
| 44 |
|
|
|
| 45 |
|
|
|
| 46 |
|
|
void wrapSimInfo((void (*fSub)( int*, double*, double*, double*))){ |
| 47 |
|
|
|
| 48 |
|
|
currentInfo->setInternal(fSub); |
| 49 |
|
|
} |