# | 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); |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |