ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/io/DumpReader.cpp
(Generate patch)

Comparing trunk/src/io/DumpReader.cpp (file contents):
Revision 1879 by gezelter, Sun Jun 16 15:15:42 2013 UTC vs.
Revision 1938 by gezelter, Thu Oct 31 15:32:17 2013 UTC

# Line 43 | Line 43
43   #define _LARGEFILE_SOURCE64
44   #define _FILE_OFFSET_BITS 64
45  
46 + #ifdef IS_MPI
47 + #include <mpi.h>
48 + #endif
49 +
50   #include <sys/types.h>
51   #include <sys/stat.h>
52  
# Line 60 | Line 64
64   #include "utils/StringTokenizer.hpp"
65   #include "brains/Thermo.hpp"
66  
63 #ifdef IS_MPI
64 #include <mpi.h>
65 #endif
67  
67
68   namespace OpenMD {
69    
70    DumpReader::DumpReader(SimInfo* info, const std::string& filename)
# Line 560 | Line 560 | namespace OpenMD {
560      if (i >> siteIndex) {
561        // chew up this token and parse as an int:
562        siteIndex = tokenizer.nextTokenAsInt();
563 <      RigidBody* rb = static_cast<RigidBody*>(sd);
564 <      sd = rb->getAtoms()[siteIndex];
563 >
564 >      if (sd->isRigidBody()) {
565 >        RigidBody* rb = static_cast<RigidBody*>(sd);
566 >        sd = rb->getAtoms()[siteIndex];
567 >      }
568      }
569  
570      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines