258 |
|
int which_node; |
259 |
|
double atomData[13]; |
260 |
|
int isDirectional; |
261 |
– |
const char * atomTypeString; |
261 |
|
char MPIatomTypeString[MINIBUFFERSIZE]; |
262 |
|
int msgLen; // the length of message actually recieved at master nodes |
263 |
|
int haveError; |
329 |
|
which_node, myPotato, MPI_COMM_WORLD, |
330 |
|
&istatus); |
331 |
|
|
333 |
– |
atomTypeString = MPIatomTypeString; |
334 |
– |
|
332 |
|
myPotato++; |
333 |
|
|
334 |
|
MPI_Recv(atomData, 13, MPI_DOUBLE, which_node, myPotato, |
346 |
|
|
347 |
|
if (!isDirectional) { |
348 |
|
sprintf(writeLine, "%s\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t", |
349 |
< |
atomTypeString, atomData[0], |
349 |
> |
MPIatomTypeString, atomData[0], |
350 |
|
atomData[1], atomData[2], |
351 |
|
atomData[3], atomData[4], |
352 |
|
atomData[5]); |
356 |
|
} else { |
357 |
|
sprintf(writeLine, |
358 |
|
"%s\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\n", |
359 |
< |
atomTypeString, |
359 |
> |
MPIatomTypeString, |
360 |
|
atomData[0], |
361 |
|
atomData[1], |
362 |
|
atomData[2], |
388 |
|
} |
389 |
|
|
390 |
|
for (integrableObject = mol->beginIntegrableObject(ii); integrableObject != NULL; |
391 |
< |
integrableObject = mol->nextIntegrableObject(ii)) { |
395 |
< |
|
396 |
< |
atomTypeString = integrableObject->getType().c_str(); |
391 |
> |
integrableObject = mol->nextIntegrableObject(ii)) { |
392 |
|
|
393 |
|
pos = integrableObject->getPos(); |
394 |
|
vel = integrableObject->getVel(); |
427 |
|
|
428 |
|
if (!isDirectional) { |
429 |
|
sprintf(writeLine, "%s\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t", |
430 |
< |
atomTypeString, atomData[0], |
430 |
> |
integrableObject->getType().c_str(), atomData[0], |
431 |
|
atomData[1], atomData[2], |
432 |
|
atomData[3], atomData[4], |
433 |
|
atomData[5]); |
437 |
|
} else { |
438 |
|
sprintf(writeLine, |
439 |
|
"%s\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\n", |
440 |
< |
atomTypeString, |
440 |
> |
integrableObject->getType().c_str(), |
441 |
|
atomData[0], |
442 |
|
atomData[1], |
443 |
|
atomData[2], |
510 |
|
&istatus); |
511 |
|
} |
512 |
|
|
518 |
– |
atomTypeString = integrableObject->getType().c_str(); |
519 |
– |
|
513 |
|
pos = integrableObject->getPos(); |
514 |
|
vel = integrableObject->getVel(); |
515 |
|
|
539 |
|
atomData[12] = ji[2]; |
540 |
|
} |
541 |
|
|
542 |
< |
strncpy(MPIatomTypeString, atomTypeString, MINIBUFFERSIZE); |
542 |
> |
strncpy(MPIatomTypeString, integrableObject->getType().c_str(), MINIBUFFERSIZE); |
543 |
|
|
544 |
|
// null terminate the std::string before sending (just in case): |
545 |
|
MPIatomTypeString[MINIBUFFERSIZE - 1] = '\0'; |