209 |
dotrack_(&(t->npoint),dzin,dxout,dyout,dal,&ifail); |
dotrack_(&(t->npoint),dzin,dxout,dyout,dal,&ifail); |
210 |
|
|
211 |
for (int i=0; i<t->npoint; i++){ |
for (int i=0; i<t->npoint; i++){ |
212 |
t->x[i] = (float)*dxout++; |
t->x[i] = (float)*(dxout+i); |
213 |
t->y[i] = (float)*dyout++; |
t->y[i] = (float)*(dyout+i); |
214 |
} |
} |
215 |
|
|
216 |
// delete [] dxout; |
delete [] dxout; |
217 |
// delete [] dyout; |
delete [] dyout; |
218 |
// delete [] dzin; |
delete [] dzin; |
219 |
|
|
220 |
return ifail; |
return ifail; |
221 |
}; |
}; |
253 |
dotrack2_(&(t->npoint),dzin,dxout,dyout,dthxout,dthyout,dtlout,dal,&ifail); |
dotrack2_(&(t->npoint),dzin,dxout,dyout,dthxout,dthyout,dtlout,dal,&ifail); |
254 |
|
|
255 |
for (int i=0; i<t->npoint; i++){ |
for (int i=0; i<t->npoint; i++){ |
256 |
t->x[i] = (float)*dxout++; |
t->x[i] = (float)*(dxout+i); |
257 |
t->y[i] = (float)*dyout++; |
t->y[i] = (float)*(dyout+i); |
258 |
t->thx[i] = (float)*dthxout++; |
t->thx[i] = (float)*(dthxout+i); |
259 |
t->thy[i] = (float)*dthyout++; |
t->thy[i] = (float)*(dthyout+i); |
260 |
t->tl[i] = (float)*dtlout++; |
t->tl[i] = (float)*(dtlout+i); |
261 |
} |
} |
262 |
|
|
263 |
// delete [] dxout; |
delete [] dxout; |
264 |
// delete [] dyout; |
delete [] dyout; |
265 |
// delete [] dzin; |
delete [] dzin; |
266 |
|
delete [] dthxout; |
267 |
|
delete [] dthyout; |
268 |
|
delete [] dtlout; |
269 |
|
|
270 |
return ifail; |
return ifail; |
271 |
}; |
}; |
2145 |
*/ |
*/ |
2146 |
int Trajectory::DoTrack2(float* al){ |
int Trajectory::DoTrack2(float* al){ |
2147 |
|
|
2148 |
double *dxout = new double[npoint]; |
// double *dxout = new double[npoint]; |
2149 |
double *dyout = new double[npoint]; |
// double *dyout = new double[npoint]; |
2150 |
double *dthxout = new double[npoint]; |
// double *dthxout = new double[npoint]; |
2151 |
double *dthyout = new double[npoint]; |
// double *dthyout = new double[npoint]; |
2152 |
double *dtlout = new double[npoint]; |
// double *dtlout = new double[npoint]; |
2153 |
double *dzin = new double[npoint]; |
// double *dzin = new double[npoint]; |
2154 |
double dal[5]; |
|
2155 |
|
double *dxout; |
2156 |
|
double *dyout; |
2157 |
|
double *dthxout; |
2158 |
|
double *dthyout; |
2159 |
|
double *dtlout; |
2160 |
|
double *dzin; |
2161 |
|
|
2162 |
|
dxout = (double*) malloc(npoint*sizeof(double)); |
2163 |
|
dyout = (double*) malloc(npoint*sizeof(double)); |
2164 |
|
dthxout = (double*) malloc(npoint*sizeof(double)); |
2165 |
|
dthyout = (double*) malloc(npoint*sizeof(double)); |
2166 |
|
dtlout = (double*) malloc(npoint*sizeof(double)); |
2167 |
|
dzin = (double*) malloc(npoint*sizeof(double)); |
2168 |
|
|
2169 |
|
double dal[5]; |
2170 |
|
|
2171 |
int ifail = 0; |
int ifail = 0; |
2172 |
|
|
2181 |
dotrack2_(&(npoint),dzin,dxout,dyout,dthxout,dthyout,dtlout,dal,&ifail); |
dotrack2_(&(npoint),dzin,dxout,dyout,dthxout,dthyout,dtlout,dal,&ifail); |
2182 |
|
|
2183 |
for (int i=0; i<npoint; i++){ |
for (int i=0; i<npoint; i++){ |
2184 |
x[i] = (float)*dxout++; |
x[i] = (float)*(dxout+i); |
2185 |
y[i] = (float)*dyout++; |
y[i] = (float)*(dyout+i); |
2186 |
thx[i] = (float)*dthxout++; |
thx[i] = (float)*(dthxout+i); |
2187 |
thy[i] = (float)*dthyout++; |
thy[i] = (float)*(dthyout+i); |
2188 |
tl[i] = (float)*dtlout++; |
tl[i] = (float)*(dtlout+i); |
2189 |
} |
} |
2190 |
|
|
2191 |
|
if(dxout) free( dxout ); |
2192 |
|
if(dyout) free( dyout ); |
2193 |
|
if(dthxout)free( dthxout ); |
2194 |
|
if(dthyout)free( dthyout ); |
2195 |
|
if(dtlout) free( dtlout ); |
2196 |
|
if(dzin) free( dzin ); |
2197 |
|
|
2198 |
|
// delete [] dxout; |
2199 |
|
// delete [] dyout; |
2200 |
|
// delete [] dthxout; |
2201 |
|
// delete [] dthyout; |
2202 |
|
// delete [] dtlout; |
2203 |
|
// delete [] dzin; |
2204 |
|
|
2205 |
|
|
2206 |
return ifail; |
return ifail; |
2207 |
}; |
}; |