| 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 | 
  | 
 | 
| 180 | 
  | 
 | 
| 181 | 
  | 
  calcForce(1, 1); | 
| 182 | 
  | 
 | 
| 183 | 
+ | 
  //temp test | 
| 184 | 
+ | 
  tStats->getPotential(); | 
| 185 | 
+ | 
   | 
| 186 | 
  | 
  if (nConstrained){ | 
| 187 | 
  | 
    preMove(); | 
| 188 | 
  | 
    constrainA(); | 
| 189 | 
  | 
    calcForce(1, 1); | 
| 190 | 
  | 
    constrainB(); | 
| 191 | 
  | 
  } | 
| 192 | 
< | 
 | 
| 192 | 
> | 
   | 
| 193 | 
  | 
  if (info->setTemp){ | 
| 194 | 
  | 
    thermalize(); | 
| 195 | 
  | 
  } | 
| 205 | 
  | 
  statOut->writeStat(info->getTime()); | 
| 206 | 
  | 
 | 
| 207 | 
  | 
 | 
| 201 | 
– | 
 | 
| 208 | 
  | 
#ifdef IS_MPI | 
| 209 | 
  | 
  strcpy(checkPointMsg, "The integrator is ready to go."); | 
| 210 | 
  | 
  MPIcheckPoint(); | 
| 216 | 
  | 
      calcStress = 1; | 
| 217 | 
  | 
    } | 
| 218 | 
  | 
 | 
| 219 | 
+ | 
#ifdef PROFILE | 
| 220 | 
+ | 
    startProfile( pro1 ); | 
| 221 | 
+ | 
#endif | 
| 222 | 
+ | 
     | 
| 223 | 
  | 
    integrateStep(calcPot, calcStress); | 
| 224 | 
  | 
 | 
| 225 | 
+ | 
#ifdef PROFILE | 
| 226 | 
+ | 
    endProfile( pro1 ); | 
| 227 | 
+ | 
 | 
| 228 | 
+ | 
    startProfile( pro2 ); | 
| 229 | 
+ | 
#endif // profile | 
| 230 | 
+ | 
 | 
| 231 | 
  | 
    info->incrTime(dt); | 
| 232 | 
  | 
 | 
| 233 | 
  | 
    if (info->setTemp){ | 
| 255 | 
  | 
        currReset += resetTime; | 
| 256 | 
  | 
      } | 
| 257 | 
  | 
    } | 
| 258 | 
+ | 
     | 
| 259 | 
+ | 
#ifdef PROFILE | 
| 260 | 
+ | 
    endProfile( pro2 ); | 
| 261 | 
+ | 
#endif //profile | 
| 262 | 
  | 
 | 
| 263 | 
  | 
#ifdef IS_MPI | 
| 264 | 
  | 
    strcpy(checkPointMsg, "successfully took a time step."); | 
| 265 | 
  | 
    MPIcheckPoint(); | 
| 266 | 
  | 
#endif // is_mpi | 
| 267 | 
  | 
  } | 
| 248 | 
– | 
 | 
| 249 | 
– | 
 | 
| 250 | 
– | 
  // write the last frame | 
| 251 | 
– | 
  dumpOut->writeDump(info->getTime()); | 
| 268 | 
  | 
 | 
| 269 | 
  | 
  delete dumpOut; | 
| 270 | 
  | 
  delete statOut; | 
| 273 | 
  | 
template<typename T> void Integrator<T>::integrateStep(int calcPot, | 
| 274 | 
  | 
                                                       int calcStress){ | 
| 275 | 
  | 
  // Position full step, and velocity half step | 
| 276 | 
+ | 
 | 
| 277 | 
+ | 
#ifdef PROFILE | 
| 278 | 
+ | 
  startProfile(pro3); | 
| 279 | 
+ | 
#endif //profile | 
| 280 | 
+ | 
 | 
| 281 | 
  | 
  preMove(); | 
| 282 | 
  | 
 | 
| 283 | 
< | 
  moveA(); | 
| 283 | 
> | 
#ifdef PROFILE | 
| 284 | 
> | 
  endProfile(pro3); | 
| 285 | 
  | 
 | 
| 286 | 
+ | 
  startProfile(pro4); | 
| 287 | 
+ | 
#endif // profile | 
| 288 | 
  | 
 | 
| 289 | 
+ | 
  moveA(); | 
| 290 | 
  | 
 | 
| 291 | 
+ | 
#ifdef PROFILE | 
| 292 | 
+ | 
  endProfile(pro4); | 
| 293 | 
+ | 
   | 
| 294 | 
+ | 
  startProfile(pro5); | 
| 295 | 
+ | 
#endif//profile | 
| 296 | 
  | 
 | 
| 297 | 
+ | 
 | 
| 298 | 
  | 
#ifdef IS_MPI | 
| 299 | 
  | 
  strcpy(checkPointMsg, "Succesful moveA\n"); | 
| 300 | 
  | 
  MPIcheckPoint(); | 
| 310 | 
  | 
  MPIcheckPoint(); | 
| 311 | 
  | 
#endif // is_mpi | 
| 312 | 
  | 
 | 
| 313 | 
+ | 
#ifdef PROFILE | 
| 314 | 
+ | 
  endProfile( pro5 ); | 
| 315 | 
  | 
 | 
| 316 | 
+ | 
  startProfile( pro6 ); | 
| 317 | 
+ | 
#endif //profile | 
| 318 | 
+ | 
 | 
| 319 | 
  | 
  // finish the velocity  half step | 
| 320 | 
  | 
 | 
| 321 | 
  | 
  moveB(); | 
| 286 | 
– | 
 | 
| 322 | 
  | 
 | 
| 323 | 
+ | 
#ifdef PROFILE | 
| 324 | 
+ | 
  endProfile(pro6); | 
| 325 | 
+ | 
#endif // profile | 
| 326 | 
  | 
 | 
| 327 | 
  | 
#ifdef IS_MPI | 
| 328 | 
  | 
  strcpy(checkPointMsg, "Succesful moveB\n"); |