Changeset 504492
- Timestamp:
- Aug 2, 2017, 9:20:36 PM (8 years ago)
- Branches:
- ForceAnnealing_with_BondGraph_continued
- Children:
- 7ef5d32
- Parents:
- 152599
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Dynamics/ForceAnnealing.hpp
r152599 r504492 112 112 113 113 // always use atomic annealing on first step 114 anneal(_CurrentTimeStep, _offset, maxComponents);114 maxComponents = anneal(_CurrentTimeStep); 115 115 } else { 116 116 ++currentStep; … … 119 119 // bond graph annealing is always followed by a normal annealing 120 120 if (_UseBondgraph) 121 annealWithBondGraph(_CurrentTimeStep, _offset, maxComponents);121 maxComponents = annealWithBondGraph(_CurrentTimeStep); 122 122 // cannot store RemnantGradient in Atom's Force as it ruins BB stepwidth calculation 123 123 else 124 anneal(_CurrentTimeStep, _offset, maxComponents);124 maxComponents = anneal(_CurrentTimeStep); 125 125 } 126 126 … … 140 140 * 141 141 * \param CurrentTimeStep current time step (i.e. \f$ t + \Delta t \f$ in the sense of the velocity verlet) 142 * \param offset offset in matrix file to the first force component 143 * \param maxComponents to be filled with maximum force component over all atoms 144 */ 145 void anneal( 146 const int CurrentTimeStep, 147 const size_t offset, 148 Vector &maxComponents) 142 * \return to be filled with maximum force component over all atoms 143 */ 144 Vector anneal( 145 const int CurrentTimeStep) 149 146 { 147 Vector maxComponents; 150 148 bool deltat_decreased = false; 151 149 for(typename AtomSetMixin<T>::iterator iter = AtomicForceManipulator<T>::atoms.begin(); … … 203 201 (*iter)->setPosition(currentPosition + PositionUpdate); 204 202 } 203 204 return maxComponents; 205 205 } 206 206 … … 250 250 * 251 251 * \param CurrentTimeStep current time step (i.e. \f$ t + \Delta t \f$ in the sense of the velocity verlet) 252 * \param offset offset in matrix file to the first force component253 252 * \param maxComponents to be filled with maximum force component over all atoms 254 253 */ 255 void annealWithBondGraph( 256 const int CurrentTimeStep, 257 const size_t offset, 258 Vector &maxComponents) 254 Vector annealWithBondGraph( 255 const int CurrentTimeStep) 259 256 { 257 Vector maxComponents; 258 260 259 // get nodes on either side of selected bond via BFS discovery 261 260 BoostGraphCreator BGcreator; … … 507 506 // walker->setAtomicForce( RemnantGradient_per_atom[walker->getId()] ); 508 507 } 508 509 return maxComponents; 509 510 } 510 511
Note:
See TracChangeset
for help on using the changeset viewer.