Changeset 9bb8c8


Ignore:
Timestamp:
Apr 10, 2018, 6:43:12 AM (7 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
AutomationFragmentation_failures, Candidate_v1.6.1, ChemicalSpaceEvaluator, Enhanced_StructuralOptimization_continued, Exclude_Hydrogens_annealWithBondGraph, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_contraction-expansion, Gui_displays_atomic_force_velocity, PythonUI_with_named_parameters, StoppableMakroAction, TremoloParser_IncreasedPrecision
Children:
41de6e
Parents:
c87d6e
git-author:
Frederik Heber <frederik.heber@…> (08/08/17 20:43:42)
git-committer:
Frederik Heber <frederik.heber@…> (04/10/18 06:43:12)
Message:

FIX: maxComponents was not chosen by absolute magnitude.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Dynamics/ForceAnnealing.hpp

    rc87d6e r9bb8c8  
    167167      // extract largest components for showing progress of annealing
    168168      for(size_t i=0;i<NDIM;++i)
    169         if (currentGradient[i] > maxComponents[i])
    170           maxComponents[i] = currentGradient[i];
     169        maxComponents[i] = std::max(maxComponents[i], fabs(currentGradient[i]));
    171170
    172171      // are we in initial step? Then don't check against velocity
     
    312311      // extract largest components for showing progress of annealing
    313312      for(size_t i=0;i<NDIM;++i)
    314         if (currentGradient[i] > maxComponents[i])
    315           maxComponents[i] = currentGradient[i];
     313        maxComponents[i] = std::max(maxComponents[i], fabs(currentGradient[i]));
    316314    }
    317315    // apply the gathered updates
Note: See TracChangeset for help on using the changeset viewer.