56 |
|
Amat = new double[nElements*9]; |
57 |
|
mu = new double[nElements]; |
58 |
|
ul = new double[nElements*3]; |
59 |
– |
rc = new double[nElements*3]; |
60 |
– |
massRatio = new double[nElements]; |
59 |
|
|
60 |
|
// init directional values to zero |
61 |
|
|
98 |
|
if(Amat != NULL) delete[] Amat; |
99 |
|
if(mu != NULL) delete[] mu; |
100 |
|
if(ul != NULL) delete[] ul; |
103 |
– |
if(rc != NULL) delete[] rc; |
104 |
– |
if(massRatio != NULL) delete[] massRatio; |
101 |
|
|
102 |
|
pos = NULL; |
103 |
|
vel = NULL; |
106 |
|
Amat = NULL; |
107 |
|
mu = NULL; |
108 |
|
ul = NULL; |
113 |
– |
rc = NULL; |
114 |
– |
massRatio = NULL; |
109 |
|
|
110 |
+ |
|
111 |
|
arraysAllocated = false; |
112 |
|
nElements = 0; |
113 |
|
} |
119 |
|
double** the_trq, |
120 |
|
double** the_Amat, |
121 |
|
double** the_mu, |
122 |
< |
double** the_ul, |
128 |
< |
double** the_rc, |
129 |
< |
double** the_massRatio){ |
122 |
> |
double** the_ul){ |
123 |
|
int index3, index9; |
124 |
|
|
125 |
|
if( arraysAllocated ){ |
134 |
|
*the_Amat = &(Amat[index9]); |
135 |
|
*the_mu = &(mu[index]); |
136 |
|
*the_ul = &(ul[index3]); |
144 |
– |
*the_rc = &(rc[index3]); |
145 |
– |
*the_massRatio = &(massRatio[index]); |
137 |
|
} |
138 |
|
else{ |
139 |
|
|