Changeset 504492


Ignore:
Timestamp:
Aug 2, 2017, 9:20:36 PM (8 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
ForceAnnealing_with_BondGraph_continued
Children:
7ef5d32
Parents:
152599
Message:

tempcommit: anneal() returns maxComponents, does not neet _offset.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Dynamics/ForceAnnealing.hpp

    r152599 r504492  
    112112
    113113      // always use atomic annealing on first step
    114       anneal(_CurrentTimeStep, _offset, maxComponents);
     114      maxComponents = anneal(_CurrentTimeStep);
    115115    } else {
    116116      ++currentStep;
     
    119119      // bond graph annealing is always followed by a normal annealing
    120120      if (_UseBondgraph)
    121         annealWithBondGraph(_CurrentTimeStep, _offset, maxComponents);
     121        maxComponents = annealWithBondGraph(_CurrentTimeStep);
    122122      // cannot store RemnantGradient in Atom's Force as it ruins BB stepwidth calculation
    123123      else
    124         anneal(_CurrentTimeStep, _offset, maxComponents);
     124        maxComponents = anneal(_CurrentTimeStep);
    125125    }
    126126
     
    140140   *
    141141   * \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)
    149146  {
     147    Vector maxComponents;
    150148    bool deltat_decreased = false;
    151149                for(typename AtomSetMixin<T>::iterator iter = AtomicForceManipulator<T>::atoms.begin();
     
    203201                        (*iter)->setPosition(currentPosition + PositionUpdate);
    204202                }
     203
     204    return maxComponents;
    205205  }
    206206
     
    250250   *
    251251   * \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 component
    253252   * \param maxComponents to be filled with maximum force component over all atoms
    254253   */
    255   void annealWithBondGraph(
    256       const int CurrentTimeStep,
    257       const size_t offset,
    258       Vector &maxComponents)
     254  Vector annealWithBondGraph(
     255      const int CurrentTimeStep)
    259256  {
     257    Vector maxComponents;
     258
    260259    // get nodes on either side of selected bond via BFS discovery
    261260    BoostGraphCreator BGcreator;
     
    507506//      walker->setAtomicForce( RemnantGradient_per_atom[walker->getId()] );
    508507    }
     508
     509    return maxComponents;
    509510  }
    510511
Note: See TracChangeset for help on using the changeset viewer.