| 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 |
|
|
| 68 |
|
|
| 69 |
|
SRI** theArray; |
| 70 |
|
for (int i = 0; i < nMols; i++){ |
| 71 |
< |
theArray = (SRI * *) molecules[i].getMyBonds(); |
| 71 |
> |
|
| 72 |
> |
theArray = (SRI * *) molecules[i].getMyBonds(); |
| 73 |
|
for (int j = 0; j < molecules[i].getNBonds(); j++){ |
| 74 |
|
constrained = theArray[j]->is_constrained(); |
| 75 |
|
|
| 115 |
|
} |
| 116 |
|
} |
| 117 |
|
|
| 118 |
+ |
|
| 119 |
|
if (nConstrained > 0){ |
| 120 |
|
isConstrained = 1; |
| 121 |
|
|
| 137 |
|
} |
| 138 |
|
|
| 139 |
|
|
| 140 |
< |
// save oldAtoms to check for lode balanceing later on. |
| 140 |
> |
// save oldAtoms to check for lode balancing later on. |
| 141 |
|
|
| 142 |
|
oldAtoms = nAtoms; |
| 143 |
|
|
| 182 |
|
|
| 183 |
|
calcForce(1, 1); |
| 184 |
|
|
| 185 |
+ |
//temp test |
| 186 |
+ |
tStats->getPotential(); |
| 187 |
+ |
|
| 188 |
|
if (nConstrained){ |
| 189 |
|
preMove(); |
| 190 |
|
constrainA(); |
| 218 |
|
calcStress = 1; |
| 219 |
|
} |
| 220 |
|
|
| 221 |
+ |
#ifdef PROFILE |
| 222 |
+ |
startProfile( pro1 ); |
| 223 |
+ |
#endif |
| 224 |
+ |
|
| 225 |
|
integrateStep(calcPot, calcStress); |
| 226 |
|
|
| 227 |
+ |
#ifdef PROFILE |
| 228 |
+ |
endProfile( pro1 ); |
| 229 |
+ |
|
| 230 |
+ |
startProfile( pro2 ); |
| 231 |
+ |
#endif // profile |
| 232 |
+ |
|
| 233 |
|
info->incrTime(dt); |
| 234 |
|
|
| 235 |
|
if (info->setTemp){ |
| 257 |
|
currReset += resetTime; |
| 258 |
|
} |
| 259 |
|
} |
| 260 |
+ |
|
| 261 |
+ |
#ifdef PROFILE |
| 262 |
+ |
endProfile( pro2 ); |
| 263 |
+ |
#endif //profile |
| 264 |
|
|
| 265 |
|
#ifdef IS_MPI |
| 266 |
|
strcpy(checkPointMsg, "successfully took a time step."); |
| 268 |
|
#endif // is_mpi |
| 269 |
|
} |
| 270 |
|
|
| 248 |
– |
|
| 249 |
– |
// write the last frame |
| 250 |
– |
dumpOut->writeDump(info->getTime()); |
| 251 |
– |
|
| 271 |
|
delete dumpOut; |
| 272 |
|
delete statOut; |
| 273 |
|
} |
| 275 |
|
template<typename T> void Integrator<T>::integrateStep(int calcPot, |
| 276 |
|
int calcStress){ |
| 277 |
|
// Position full step, and velocity half step |
| 278 |
+ |
|
| 279 |
+ |
#ifdef PROFILE |
| 280 |
+ |
startProfile(pro3); |
| 281 |
+ |
#endif //profile |
| 282 |
+ |
|
| 283 |
|
preMove(); |
| 284 |
|
|
| 285 |
< |
moveA(); |
| 285 |
> |
#ifdef PROFILE |
| 286 |
> |
endProfile(pro3); |
| 287 |
|
|
| 288 |
+ |
startProfile(pro4); |
| 289 |
+ |
#endif // profile |
| 290 |
+ |
|
| 291 |
+ |
moveA(); |
| 292 |
|
|
| 293 |
+ |
#ifdef PROFILE |
| 294 |
+ |
endProfile(pro4); |
| 295 |
+ |
|
| 296 |
+ |
startProfile(pro5); |
| 297 |
+ |
#endif//profile |
| 298 |
|
|
| 299 |
|
|
| 300 |
|
#ifdef IS_MPI |
| 311 |
|
strcpy(checkPointMsg, "Succesful doForces\n"); |
| 312 |
|
MPIcheckPoint(); |
| 313 |
|
#endif // is_mpi |
| 314 |
+ |
|
| 315 |
+ |
#ifdef PROFILE |
| 316 |
+ |
endProfile( pro5 ); |
| 317 |
|
|
| 318 |
+ |
startProfile( pro6 ); |
| 319 |
+ |
#endif //profile |
| 320 |
|
|
| 321 |
|
// finish the velocity half step |
| 322 |
|
|
| 323 |
|
moveB(); |
| 285 |
– |
|
| 324 |
|
|
| 325 |
+ |
#ifdef PROFILE |
| 326 |
+ |
endProfile(pro6); |
| 327 |
+ |
#endif // profile |
| 328 |
|
|
| 329 |
|
#ifdef IS_MPI |
| 330 |
|
strcpy(checkPointMsg, "Succesful moveB\n"); |