ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/io/DumpWriter.cpp
(Generate patch)

Comparing trunk/OOPSE-4/src/io/DumpWriter.cpp (file contents):
Revision 2060 by tim, Thu Feb 24 20:55:07 2005 UTC vs.
Revision 2079 by tim, Thu Mar 3 14:40:20 2005 UTC

# Line 258 | Line 258 | void DumpWriter::writeFrame(std::ostream& os) {
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;
# Line 330 | Line 329 | void DumpWriter::writeFrame(std::ostream& os) {
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,
# Line 349 | Line 346 | void DumpWriter::writeFrame(std::ostream& os) {
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]);
# Line 359 | Line 356 | void DumpWriter::writeFrame(std::ostream& os) {
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],
# Line 391 | Line 388 | void DumpWriter::writeFrame(std::ostream& os) {
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();
# Line 432 | Line 427 | void DumpWriter::writeFrame(std::ostream& os) {
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]);
# Line 442 | Line 437 | void DumpWriter::writeFrame(std::ostream& os) {
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],
# Line 515 | Line 510 | void DumpWriter::writeFrame(std::ostream& os) {
510                                   &istatus);
511                      }
512  
518                    atomTypeString = integrableObject->getType().c_str();
519
513                      pos = integrableObject->getPos();
514                      vel = integrableObject->getVel();
515  
# Line 546 | Line 539 | void DumpWriter::writeFrame(std::ostream& os) {
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';

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines