Changeset 0c4f24 for src


Ignore:
Timestamp:
Apr 10, 2018, 6:43:31 AM (7 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
AutomationFragmentation_failures, Candidate_v1.6.1, ChemicalSpaceEvaluator, Exclude_Hydrogens_annealWithBondGraph, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_contraction-expansion, Gui_displays_atomic_force_velocity, PythonUI_with_named_parameters, StoppableMakroAction, TremoloParser_IncreasedPrecision
Children:
90ece9
Parents:
441d40
git-author:
Frederik Heber <frederik.heber@…> (08/02/17 21:20:36)
git-committer:
Frederik Heber <frederik.heber@…> (04/10/18 06:43:31)
Message:

anneal() returns maxComponents, does not neet _offset.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Dynamics/ForceAnnealing.hpp

    r441d40 r0c4f24  
    114114
    115115      // always use atomic annealing on first step
    116       anneal(_CurrentTimeStep, _offset, maxComponents);
     116      maxComponents = anneal(_CurrentTimeStep);
    117117    } else {
    118118      ++currentStep;
     
    121121      // bond graph annealing is always followed by a normal annealing
    122122      if (_UseBondgraph)
    123         annealWithBondGraph(_CurrentTimeStep, _offset, maxComponents);
     123        maxComponents = annealWithBondGraph(_CurrentTimeStep);
    124124      // cannot store RemnantGradient in Atom's Force as it ruins BB stepwidth calculation
    125125      else
    126         anneal(_CurrentTimeStep, _offset, maxComponents);
     126        maxComponents = anneal(_CurrentTimeStep);
    127127    }
    128128
     
    164164   *
    165165   * \param CurrentTimeStep current time step (i.e. \f$ t + \Delta t \f$ in the sense of the velocity verlet)
    166    * \param offset offset in matrix file to the first force component
    167    * \param maxComponents to be filled with maximum force component over all atoms
    168    */
    169   void anneal(
    170       const int CurrentTimeStep,
    171       const size_t offset,
    172       Vector &maxComponents)
     166   * \return to be filled with maximum force component over all atoms
     167   */
     168  Vector anneal(
     169      const int CurrentTimeStep)
    173170  {
     171    Vector maxComponents;
    174172    bool deltat_decreased = false;
    175173    for(typename AtomSetMixin<T>::iterator iter = AtomicForceManipulator<T>::atoms.begin();
     
    217215      (*iter)->setPosition(currentPosition + PositionUpdate);
    218216    }
     217
     218    return maxComponents;
    219219  }
    220220
     
    264264   *
    265265   * \param CurrentTimeStep current time step (i.e. \f$ t + \Delta t \f$ in the sense of the velocity verlet)
    266    * \param offset offset in matrix file to the first force component
    267266   * \param maxComponents to be filled with maximum force component over all atoms
    268267   */
    269   void annealWithBondGraph(
    270       const int CurrentTimeStep,
    271       const size_t offset,
    272       Vector &maxComponents)
     268  Vector annealWithBondGraph(
     269      const int CurrentTimeStep)
    273270  {
     271    Vector maxComponents;
     272
    274273    // get nodes on either side of selected bond via BFS discovery
    275274    BoostGraphCreator BGcreator;
     
    528527//      walker->setAtomicForce( RemnantGradient_per_atom[walker->getId()] );
    529528    }
     529
     530    return maxComponents;
    530531  }
    531532
Note: See TracChangeset for help on using the changeset viewer.