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