Changeset c5ac2a
- Timestamp:
- Sep 19, 2017, 9:59:46 PM (8 years ago)
- Children:
- 24bb38, 8e7966e
- Parents:
- 1db3520
- git-author:
- Frederik Heber <frederik.heber@…> (09/19/17 21:59:32)
- git-committer:
- Frederik Heber <frederik.heber@…> (09/19/17 21:59:46)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Dynamics/ForceAnnealing.hpp
r1db3520 rc5ac2a 282 282 for(size_t i=0;i<NDIM;++i) 283 283 maxComponents[i] = std::max(maxComponents[i], fabs(currentGradient[i])); 284 285 // steps may go back and forth again (updates are of same magnitude but286 // have different sign: Check whether this is the case and one step with287 // deltat to interrupt this sequence288 if (!PositionDifference.IsZero())289 if ((PositionUpdate.ScalarProduct(PositionDifference) < 0)290 && (fabs(PositionUpdate.NormSquared()-PositionDifference.NormSquared()) < 1e-3)) {291 // for convergence we want a null sequence here, too292 if (!deltat_decreased) {293 deltat_decreased = true;294 currentDeltat = .5*currentDeltat;295 }296 LOG(2, "DEBUG: Upgrade in other direction: " << PositionUpdate297 << " > " << PositionDifference298 << ", using deltat: " << currentDeltat);299 PositionUpdate = currentDeltat * currentGradient;300 }301 284 302 285 // finally set new values
Note:
See TracChangeset
for help on using the changeset viewer.