| 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 |
|
/** |