Changeset 05a2c5 for src/World.cpp
- Timestamp:
- May 8, 2017, 2:00:10 PM (8 years ago)
- Branches:
- ForceAnnealing_goodresults, ForceAnnealing_tocheck
- Children:
- c1446cd
- Parents:
- f97bcc
- git-author:
- Frederik Heber <heber@…> (03/23/17 17:11:47)
- git-committer:
- Frederik Heber <frederik.heber@…> (05/08/17 14:00:10)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/World.cpp
rf97bcc r05a2c5 221 221 } 222 222 223 bool areBondsPresent(const unsigned int _step)223 static bool areBondsPresent(const unsigned int _step) 224 224 { 225 225 bool status = false; … … 229 229 const atom * const Walker = *iter; 230 230 status |= !Walker->getListOfBondsAtStep(_step).empty(); 231 } 232 233 return status; 234 } 235 236 static bool areAtomsPresent(const unsigned int _step) 237 { 238 bool status = false; 239 240 for (World::AtomConstIterator iter = const_cast<const World &>(World::getInstance()).getAtomIter(); 241 (!status) && (iter != const_cast<const World &>(World::getInstance()).atomEnd()); ++iter) { 242 const atom * const Walker = *iter; 243 status |= (Walker->getTrajectorySize() >= _step); 231 244 } 232 245 … … 259 272 } 260 273 261 static void copyAtoms(const unsigned int _srcstep, const unsigned int _deststep)262 {263 for (World::AtomIterator iter = World::getInstance().getAtomIter();264 iter != World::getInstance().atomEnd(); ++iter) {265 atom * const Walker = *iter;266 Walker->UpdateStep(_deststep);267 Walker->setPositionAtStep(_deststep, Walker->getPositionAtStep(_srcstep));268 Walker->setAtomicVelocityAtStep(_deststep, Walker->getAtomicVelocityAtStep(_srcstep));269 Walker->setAtomicForceAtStep(_deststep, Walker->getAtomicForceAtStep(_srcstep));270 }271 }274 //static void copyAtoms(const unsigned int _srcstep, const unsigned int _deststep) 275 //{ 276 // for (World::AtomIterator iter = World::getInstance().getAtomIter(); 277 // iter != World::getInstance().atomEnd(); ++iter) { 278 // atom * const Walker = *iter; 279 // Walker->UpdateStep(_deststep); 280 // Walker->setPositionAtStep(_deststep, Walker->getPositionAtStep(_srcstep)); 281 // Walker->setAtomicVelocityAtStep(_deststep, Walker->getAtomicVelocityAtStep(_srcstep)); 282 // Walker->setAtomicForceAtStep(_deststep, Walker->getAtomicForceAtStep(_srcstep)); 283 // } 284 //} 272 285 273 286 void World::setTime(const unsigned int _step) … … 276 289 const unsigned int oldstep = WorldTime::getTime(); 277 290 278 copyAtoms(oldstep, _step); 291 // if (!areAtomsPresent(_step)) 292 // copyAtoms(oldstep, _step); 293 279 294 // 1. copy bond graph (such not each addBond causes GUI update) 280 295 if (!areBondsPresent(_step)) {
Note:
See TracChangeset
for help on using the changeset viewer.