1 |
#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 |
double** quat); |
26 |
|
27 |
|
28 |
double* getFrcArray ( void ) { return frc; } |
29 |
double* getPosArray ( void ) { return pos; } |
30 |
double* getTrqArray ( void ) { return trq; } |
31 |
double* getAmatArray( void ) { return Amat; } |
32 |
double* getUlArray ( void ) { return ul; } |
33 |
double* getQuatArray(void) {return quat;} |
34 |
|
35 |
private: |
36 |
int nElements; // the number of elements in the arrays |
37 |
bool arraysAllocated; // lets us know the arrays have been allocated. |
38 |
|
39 |
double* pos; // the position array |
40 |
double* vel; // the velocity array |
41 |
double* frc; // the forc array |
42 |
double* trq; // the torque vector ( space fixed ) |
43 |
double* Amat; // the rotation matrix |
44 |
double* mu; // the dipole moment array |
45 |
double* ul; // the lab frame unit directional vector |
46 |
double* quat; // the quaternion array |
47 |
}; |
48 |
|
49 |
|
50 |
|
51 |
|
52 |
#endif |