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

Comparing trunk/src/primitives/StuntDouble.hpp (file contents):
Revision 1908 by gezelter, Fri Jul 19 21:25:45 2013 UTC vs.
Revision 1993 by gezelter, Tue Apr 29 17:32:31 2014 UTC

# Line 1196 | Line 1196 | namespace OpenMD{
1196       */        
1197      void addElectricField(const Vector3d& eField, int snapshotNo) {
1198        ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).electricField[localIndex_] += eField;
1199 +    }      
1200 +
1201 +    /**
1202 +     * Returns the previous charge force of this stuntDouble
1203 +     * @return the charge force of this stuntDouble
1204 +     */    
1205 +    RealType getPrevSitePotential() {
1206 +      return ((snapshotMan_->getPrevSnapshot())->*storage_).sitePotential[localIndex_];
1207 +    }
1208 +      
1209 +    /**
1210 +     * Returns the current charge force of this stuntDouble
1211 +     * @return the charge force of this stuntDouble
1212 +     */    
1213 +    RealType getSitePotential() {
1214 +      return ((snapshotMan_->getCurrentSnapshot())->*storage_).sitePotential[localIndex_];
1215 +    }
1216 +
1217 +    /**
1218 +     * Returns the charge force of this stuntDouble in specified snapshot
1219 +     * @return the charge force of this stuntDouble
1220 +     * @param snapshotNo
1221 +     */    
1222 +    RealType getSitePotential(int snapshotNo) {
1223 +      return ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).sitePotential[localIndex_];
1224 +    }
1225 +
1226 +    /**
1227 +     * Sets  the previous charge force of this stuntDouble
1228 +     * @param spot  new charge force
1229 +     * @see #getSitePotential
1230 +     */        
1231 +    void setPrevSitePotential(RealType spot) {
1232 +      ((snapshotMan_->getPrevSnapshot())->*storage_).sitePotential[localIndex_] = spot;
1233 +    }
1234 +      
1235 +    /**
1236 +     * Sets  the current charge force of this stuntDouble
1237 +     * @param spot  new charge force
1238 +     */        
1239 +    void setSitePotential(RealType spot) {
1240 +      ((snapshotMan_->getCurrentSnapshot())->*storage_).sitePotential[localIndex_] = spot;
1241 +    }
1242 +
1243 +    /**
1244 +     * Sets  the charge force of this stuntDouble in specified snapshot
1245 +     * @param spot charge force to be set
1246 +     * @param snapshotNo
1247 +     * @see #getSitePotential
1248 +     */        
1249 +    void setSitePotential(RealType spot, int snapshotNo) {
1250 +      ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).sitePotential[localIndex_] = spot;
1251 +    }
1252 +
1253 +    /**
1254 +     * Adds charge force into the previous charge force of this stuntDouble
1255 +     * @param spot   charge force to be added
1256 +     * @see #getSitePotential
1257 +     */        
1258 +    void addPrevSitePotential(RealType spot) {
1259 +      ((snapshotMan_->getPrevSnapshot())->*storage_).sitePotential[localIndex_] += spot;
1260 +    }
1261 +      
1262 +    /**
1263 +     * Adds charge force into the current charge force of this stuntDouble
1264 +     * @param spot   charge force to be added
1265 +     */        
1266 +    void addSitePotential(RealType spot) {
1267 +      ((snapshotMan_->getCurrentSnapshot())->*storage_).sitePotential[localIndex_] += spot;
1268 +    }
1269 +
1270 +    /**
1271 +     * Adds charge force into the charge force of this stuntDouble in specified snapshot
1272 +     * @param spot charge force to be added
1273 +     * @param snapshotNo
1274 +     * @see #getSitePotential
1275 +     */        
1276 +    void addSitePotential(RealType spot, int snapshotNo) {
1277 +      ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).sitePotential[localIndex_] += spot;
1278      }      
1279  
1280  
1281 +
1282      /** Set the force of this stuntDouble to zero */
1283      void zeroForcesAndTorques();
1284      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines