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

Comparing trunk/src/brains/SimInfo.cpp (file contents):
Revision 1908 by gezelter, Fri Jul 19 21:25:45 2013 UTC vs.
Revision 1929 by gezelter, Mon Aug 19 13:12:00 2013 UTC

# Line 938 | Line 938 | namespace OpenMD {
938        }      
939      }
940  
941 <    // Build the identArray_
941 >    // Build the identArray_ and regions_
942  
943      identArray_.clear();
944 <    identArray_.reserve(getNAtoms());    
945 <    for(mol = beginMolecule(mi); mol != NULL; mol = nextMolecule(mi)) {        
944 >    identArray_.reserve(getNAtoms());  
945 >    regions_.clear();
946 >    regions_.reserve(getNAtoms());
947 >
948 >    for(mol = beginMolecule(mi); mol != NULL; mol = nextMolecule(mi)) {      
949 >      int reg = mol->getRegion();      
950        for(atom = mol->beginAtom(ai); atom != NULL; atom = mol->nextAtom(ai)) {
951          identArray_.push_back(atom->getIdent());
952 +        regions_.push_back(reg);
953        }
954      }    
955 <    
955 >      
956      topologyDone_ = true;
957    }
958  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines