7 |
|
#include <unistd.h> |
8 |
|
#endif //is_mpi |
9 |
|
|
10 |
+ |
#ifdef PROFILE |
11 |
+ |
#include "mdProfile.hpp" |
12 |
+ |
#endif // profile |
13 |
+ |
|
14 |
|
#include "Integrator.hpp" |
15 |
|
#include "simError.h" |
16 |
|
|
135 |
|
} |
136 |
|
|
137 |
|
|
138 |
< |
// save oldAtoms to check for lode balanceing later on. |
138 |
> |
// save oldAtoms to check for lode balancing later on. |
139 |
|
|
140 |
|
oldAtoms = nAtoms; |
141 |
|
|
213 |
|
calcStress = 1; |
214 |
|
} |
215 |
|
|
216 |
+ |
#ifdef PROFILE |
217 |
+ |
startProfile( pro1 ); |
218 |
+ |
#endif |
219 |
+ |
|
220 |
|
integrateStep(calcPot, calcStress); |
221 |
|
|
222 |
+ |
#ifdef PROFILE |
223 |
+ |
endProfile( pro1 ); |
224 |
+ |
|
225 |
+ |
startProfile( pro2 ); |
226 |
+ |
#endif // profile |
227 |
+ |
|
228 |
|
info->incrTime(dt); |
229 |
|
|
230 |
|
if (info->setTemp){ |
252 |
|
currReset += resetTime; |
253 |
|
} |
254 |
|
} |
255 |
+ |
|
256 |
+ |
#ifdef PROFILE |
257 |
+ |
endProfile( pro2 ); |
258 |
+ |
#endif //profile |
259 |
|
|
260 |
|
#ifdef IS_MPI |
261 |
|
strcpy(checkPointMsg, "successfully took a time step."); |
263 |
|
#endif // is_mpi |
264 |
|
} |
265 |
|
|
248 |
– |
|
249 |
– |
// write the last frame |
250 |
– |
dumpOut->writeDump(info->getTime()); |
251 |
– |
|
266 |
|
delete dumpOut; |
267 |
|
delete statOut; |
268 |
|
} |
270 |
|
template<typename T> void Integrator<T>::integrateStep(int calcPot, |
271 |
|
int calcStress){ |
272 |
|
// Position full step, and velocity half step |
273 |
+ |
|
274 |
+ |
#ifdef PROFILE |
275 |
+ |
startProfile(pro3); |
276 |
+ |
#endif //profile |
277 |
+ |
|
278 |
|
preMove(); |
279 |
|
|
280 |
< |
moveA(); |
280 |
> |
#ifdef PROFILE |
281 |
> |
endProfile(pro3); |
282 |
|
|
283 |
+ |
startProfile(pro4); |
284 |
+ |
#endif // profile |
285 |
|
|
286 |
+ |
moveA(); |
287 |
+ |
|
288 |
+ |
#ifdef PROFILE |
289 |
+ |
endProfile(pro4); |
290 |
+ |
|
291 |
+ |
startProfile(pro5); |
292 |
+ |
#endif//profile |
293 |
|
|
294 |
|
|
295 |
|
#ifdef IS_MPI |
307 |
|
MPIcheckPoint(); |
308 |
|
#endif // is_mpi |
309 |
|
|
310 |
+ |
#ifdef PROFILE |
311 |
+ |
endProfile( pro5 ); |
312 |
|
|
313 |
+ |
startProfile( pro6 ); |
314 |
+ |
#endif //profile |
315 |
+ |
|
316 |
|
// finish the velocity half step |
317 |
|
|
318 |
|
moveB(); |
319 |
|
|
320 |
< |
|
320 |
> |
#ifdef PROFILE |
321 |
> |
endProfile(pro6); |
322 |
> |
#endif // profile |
323 |
|
|
324 |
|
#ifdef IS_MPI |
325 |
|
strcpy(checkPointMsg, "Succesful moveB\n"); |