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

Comparing branches/development/src/io/DumpWriter.cpp (file contents):
Revision 1798 by gezelter, Thu Sep 13 14:10:11 2012 UTC vs.
Revision 1875 by gezelter, Fri May 17 14:41:42 2013 UTC

# Line 35 | Line 35
35   *                                                                      
36   * [1]  Meineke, et al., J. Comp. Chem. 26, 252-271 (2005).            
37   * [2]  Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006).          
38 < * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008).          
38 > * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008).          
39   * [4]  Kuang & Gezelter,  J. Chem. Phys. 133, 164101 (2010).
40   * [5]  Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011).
41   */
# Line 310 | Line 310 | namespace OpenMD {
310      SimInfo::MoleculeIterator mi;
311      Molecule::IntegrableObjectIterator ii;
312      RigidBody::AtomIterator ai;
313    Atom* atom;
313  
314   #ifndef IS_MPI
315      os << "  <Snapshot>\n";
# Line 318 | Line 317 | namespace OpenMD {
317      writeFrameProperties(os, info_->getSnapshotManager()->getCurrentSnapshot());
318  
319      os << "    <StuntDoubles>\n";
320 <    for (mol = info_->beginMolecule(mi); mol != NULL; mol = info_->nextMolecule(mi)) {
321 <
320 >    for (mol = info_->beginMolecule(mi); mol != NULL;
321 >         mol = info_->nextMolecule(mi)) {
322        
323        for (sd = mol->beginIntegrableObject(ii); sd != NULL;  
324             sd = mol->nextIntegrableObject(ii)) {        
# Line 345 | Line 344 | namespace OpenMD {
344              
345              RigidBody* rb = static_cast<RigidBody*>(sd);
346              int siteIndex = 0;
347 <            for (atom = rb->beginAtom(ai); atom != NULL;  
347 >            for (Atom* atom = rb->beginAtom(ai); atom != NULL;  
348                   atom = rb->nextAtom(ai)) {                                            
349                os << prepareSiteLine(atom, ioIndex, siteIndex);
350                siteIndex++;
# Line 447 | Line 446 | namespace OpenMD {
446              
447              RigidBody* rb = static_cast<RigidBody*>(sd);
448              int siteIndex = 0;
449 <            for (atom = rb->beginAtom(ai); atom != NULL;  
449 >            for (Atom* atom = rb->beginAtom(ai); atom != NULL;  
450                   atom = rb->nextAtom(ai)) {                                            
451                buffer += prepareSiteLine(atom, ioIndex, siteIndex);
452                siteIndex++;
# Line 726 | Line 725 | namespace OpenMD {
725   #ifdef IS_MPI
726      if (worldRank == 0) {
727   #endif // is_mpi
728 <
728 >      
729        eorStream = createOStream(eorFilename_);
730 <
730 >      writeFrame(*eorStream);
731 >      
732   #ifdef IS_MPI
733      }
734 #endif // is_mpi    
735
736    writeFrame(*eorStream);
737
738 #ifdef IS_MPI
734      if (worldRank == 0) {
735   #endif // is_mpi
736 +
737        writeClosing(*eorStream);
738        delete eorStream;
739 +
740   #ifdef IS_MPI
741      }
742   #endif // is_mpi  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines