1 |
gezelter |
2 |
#ifndef __SIMSTATE_H__ |
2 |
|
|
#define __SIMSTATE_H__ |
3 |
|
|
|
4 |
|
|
|
5 |
|
|
class SimState{ |
6 |
|
|
|
7 |
|
|
public: |
8 |
|
|
SimState(); |
9 |
|
|
~SimState(); |
10 |
|
|
|
11 |
|
|
void createArrays (int the_nElements); |
12 |
|
|
void destroyArrays(void); |
13 |
|
|
|
14 |
|
|
bool isAllocated(void) { return arraysAllocated; } |
15 |
|
|
int getNelements(void){ return nElements; } |
16 |
|
|
|
17 |
|
|
void getAtomPointers( int index, |
18 |
|
|
double** pos, |
19 |
|
|
double** vel, |
20 |
|
|
double** frc, |
21 |
|
|
double** trq, |
22 |
|
|
double** Amat, |
23 |
|
|
double** mu, |
24 |
|
|
double** ul); |
25 |
|
|
|
26 |
|
|
|
27 |
|
|
double* getFrcArray ( void ) { return frc; } |
28 |
|
|
double* getPosArray ( void ) { return pos; } |
29 |
|
|
double* getTrqArray ( void ) { return trq; } |
30 |
|
|
double* getAmatArray( void ) { return Amat; } |
31 |
|
|
double* getUlArray ( void ) { return ul; } |
32 |
|
|
|
33 |
|
|
private: |
34 |
|
|
int nElements; // the number of elements in the arrays |
35 |
|
|
bool arraysAllocated; // lets us know the arrays have been allocated. |
36 |
|
|
|
37 |
|
|
double* pos; // the position array |
38 |
|
|
double* vel; // the velocity array |
39 |
|
|
double* frc; // the forc array |
40 |
|
|
double* trq; // the torque vector ( space fixed ) |
41 |
|
|
double* Amat; // the rotation matrix |
42 |
|
|
double* mu; // the dipole moment array |
43 |
|
|
double* ul; // the lab frame unit directional vector |
44 |
|
|
}; |
45 |
|
|
|
46 |
|
|
|
47 |
|
|
|
48 |
|
|
|
49 |
|
|
#endif |