# | Line 19 | Line 19 | SimState::SimState(){ | |
---|---|---|
19 | Amat = NULL; | |
20 | mu = NULL; | |
21 | ul = NULL; | |
22 | + | rc = NULL; |
23 | + | massRatio = NULL; |
24 | } | |
25 | ||
26 | ||
# | Line 31 | Line 33 | SimState::~SimState(){ | |
33 | if(Amat != NULL) delete[] Amat; | |
34 | if(mu != NULL) delete[] mu; | |
35 | if(ul != NULL) delete[] ul; | |
36 | + | if(rc != NULL) delete[] rc; |
37 | + | if(massRatio != NULL) delete[] massRatio; |
38 | ||
39 | } | |
40 | ||
# | Line 56 | Line 60 | void SimState::createArrays (int the_nElements) { | |
60 | Amat = new double[nElements*9]; | |
61 | mu = new double[nElements]; | |
62 | ul = new double[nElements*3]; | |
63 | + | rc = new double[nElements*3]; |
64 | + | massRatio = new double[nElements]; |
65 | ||
66 | // init directional values to zero | |
67 | ||
# | Line 98 | Line 104 | void SimState::destroyArrays( void ){ | |
104 | if(Amat != NULL) delete[] Amat; | |
105 | if(mu != NULL) delete[] mu; | |
106 | if(ul != NULL) delete[] ul; | |
107 | + | if(rc != NULL) delete[] rc; |
108 | + | if(massRatio != NULL) delete[] massRatio; |
109 | ||
110 | pos = NULL; | |
111 | vel = NULL; | |
# | Line 106 | Line 114 | void SimState::destroyArrays( void ){ | |
114 | Amat = NULL; | |
115 | mu = NULL; | |
116 | ul = NULL; | |
117 | + | rc = NULL; |
118 | + | massRatio = NULL; |
119 | ||
120 | arraysAllocated = false; | |
121 | nElements = 0; | |
# | Line 118 | Line 128 | void SimState::getAtomPointers( int index, | |
128 | double** the_trq, | |
129 | double** the_Amat, | |
130 | double** the_mu, | |
131 | < | double** the_ul ){ |
131 | > | double** the_ul, |
132 | > | double** the_rc, |
133 | > | double** the_massRatio){ |
134 | int index3, index9; | |
135 | ||
136 | if( arraysAllocated ){ | |
# | Line 133 | Line 145 | void SimState::getAtomPointers( int index, | |
145 | *the_Amat = &(Amat[index9]); | |
146 | *the_mu = &(mu[index]); | |
147 | *the_ul = &(ul[index3]); | |
148 | + | *the_rc = &(rc[index3]); |
149 | + | *the_massRatio = &(massRatio[index]); |
150 | } | |
151 | else{ | |
152 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |