Skip to content

Commit

Permalink
Merge pull request #140 from UCBoulder/bug/gradient-descent-flag-used…
Browse files Browse the repository at this point in the history
…-improperly

BUG: Corrected bug where the flag to use gradient descent was impleme…
  • Loading branch information
NateAM authored Jul 16, 2024
2 parents c27a8d3 + 0a8c38e commit f69c9fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/sphinx/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Changelog

Release
=======
- Released version (:pull:`140`). By `Nathan Miller`_.
- Released version (:pull:`141`). By `Nathan Miller`_.

New Features
============
Expand All @@ -34,6 +34,7 @@ Internal Changes
Bug Fixes
=========
- Reset the iteration number when a re-attempt at a solve is performed (:pull:`138`). By `Nathan Miller`_.
- Fixed the use of the gradient descent flag for the nonlinear solve (:pull:`140`). By `Nathan Miller`_.

******************
0.4.3 (07-12-2024)
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/tardigrade_hydra.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1815,7 +1815,7 @@ namespace tardigradeHydra{
// Refine the estimate if the new point has a higher residual
if ( !checkLSConvergence( ) ){

if ( checkDescentDirection( deltaX ) || !getUseGradientDescent( ) ){
if ( checkDescentDirection( deltaX ) || !( *getUseGradientDescent( ) ) ){

// Perform an Armijo type line search when the search direction is aligned with the gradient
performArmijoTypeLineSearch( X0, deltaX );
Expand Down

0 comments on commit f69c9fa

Please sign in to comment.