/home/eoseret/qaas_runs_CPU_9468/171-148-3214/intel/CoMD/build/CoMD/CoMD/src-openmp/linkCells.c: 173 - 195
--------------------------------------------------------------------------------

173: {
174:    real_t xyz[3] = {x,y,z};
175:    
176:    // Find correct box.
177:    int iBox = getBoxFromCoord(boxes, xyz);
178:    int iOff = iBox*MAXATOMS;
179:    iOff += boxes->nAtoms[iBox];
180:    
181:    // assign values to array elements
182:    if (iBox < boxes->nLocalBoxes)
183:       atoms->nLocal++;
184:    boxes->nAtoms[iBox]++;
185:    atoms->gid[iOff] = gid;
186:    atoms->iSpecies[iOff] = iType;
187:    
188:    atoms->r[iOff][0] = x;
189:    atoms->r[iOff][1] = y;
190:    atoms->r[iOff][2] = z;
191:    
192:    atoms->p[iOff][0] = px;
193:    atoms->p[iOff][1] = py;
194:    atoms->p[iOff][2] = pz;
195: }
