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

Comparing branches/development/src/primitives/StuntDouble.cpp (file contents):
Revision 1709 by gezelter, Tue Nov 22 20:38:56 2011 UTC vs.
Revision 1710 by gezelter, Fri May 18 21:44:02 2012 UTC

# Line 62 | Line 62 | namespace OpenMD {
62    }
63  
64    void StuntDouble::zeroForcesAndTorques() {    
65 <    setFrc(V3Zero);
66 <    setTrq(V3Zero);
67 <    setParticlePot(0.0);
65 >    int sl = (snapshotMan_->getCurrentSnapshot()->*storage_).getStorageLayout();
66 >
67 >    if (sl & DataStorage::dslForce)
68 >      setFrc(V3Zero);
69 >    if (sl & DataStorage::dslTorque)
70 >      setTrq(V3Zero);
71 >    if (sl & DataStorage::dslParticlePot)
72 >      setParticlePot(0.0);
73    }
74    void StuntDouble::addProperty(GenericData* genData) {
75      properties_.addProperty(genData);  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines