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

Comparing branches/development/src/visitors/OtherVisitor.cpp (file contents):
Revision 1702 by kstocke1, Thu Apr 5 19:49:59 2012 UTC vs.
Revision 1764 by gezelter, Tue Jul 3 18:32:27 2012 UTC

# Line 45 | Line 45
45   #include "primitives/RigidBody.hpp"
46   #include "primitives/Molecule.hpp"
47   #include "brains/SimInfo.hpp"
48 + #include "brains/Thermo.hpp"
49 +
50   namespace OpenMD {
51  
52    void WrappingVisitor::visit(Atom *atom) {
# Line 77 | Line 79 | namespace OpenMD {
79  
80      Snapshot* currSnapshot = info->getSnapshotManager()->getCurrentSnapshot();
81      
82 <    for( atomInfo = atomData->beginAtomInfo(i); atomInfo; atomInfo = atomData->nextAtomInfo(i) ) {
82 >    for( atomInfo = atomData->beginAtomInfo(i); atomInfo;
83 >         atomInfo = atomData->nextAtomInfo(i) ) {
84 >
85        Vector3d newPos = atomInfo->pos - origin_;
86        currSnapshot->wrapVector(newPos);
87        atomInfo->pos = newPos;
88 +
89      }
90    }
91  
92    void WrappingVisitor::update() {
93      if (useCom_){
94 <      origin_ = info->getCom();
94 >      Thermo thermo(info);
95 >      origin_ = thermo.getCom();
96      }
97    }
98    

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines