/home/eoseret/qaas/qaas_runs/178-539-6385/intel/CoMD/build/CoMD/CoMD/src-openmp/linkCells.c: 295 - 378
--------------------------------------------------------------------------------

295:       while (ii < boxes->nAtoms[iBox])
296:       {
297:          int jBox = getBoxFromCoord(boxes, atoms->r[iOff+ii]);
298:          if (jBox != iBox)
299:             moveAtom(boxes, atoms, ii, iBox, jBox);
300:          else
301:             ++ii;
[...]
352:    int ix = (int)(floor((rr[0] - localMin[0])*boxes->invBoxSize[0]));
353:    int iy = (int)(floor((rr[1] - localMin[1])*boxes->invBoxSize[1]));
354:    int iz = (int)(floor((rr[2] - localMin[2])*boxes->invBoxSize[2]));
355: 
356: 
357:    // For each axis, if we are inside the local domain, make sure we get
358:    // a local link cell.  Otherwise, make sure we get a halo link cell.
359:    if (rr[0] < localMax[0]) 
360:    {
361:       if (ix == gridSize[0]) ix = gridSize[0] - 1;
362:    }
363:    else
364:       ix = gridSize[0]; // assign to halo cell
365:    if (rr[1] < localMax[1])
[...]
371:    if (rr[2] < localMax[2])
[...]
378:    return getBoxFromTuple(boxes, ix, iy, iz);
