Skip to content

Commit

Permalink
smooth_step -> after_line_search_custom_operation
Browse files Browse the repository at this point in the history
  • Loading branch information
Huangzizhou committed Sep 12, 2024
1 parent baa3f10 commit 5e8eb3d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/polysolve/nonlinear/Problem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ namespace polysolve::nonlinear
/// @param new_x New solution.
virtual void solution_changed(const TVector &new_x) {}

virtual bool smooth_step(const TVector &x0, const TVector &x1) { return false; }
virtual bool after_line_search_custom_operation(const TVector &x0, const TVector &x1) { return false; }

/// @brief Callback function used to determine if the solver should stop.
/// @param state Current state of the solver.
Expand Down
2 changes: 1 addition & 1 deletion src/polysolve/nonlinear/Solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ namespace polysolve::nonlinear

{
TVector x1 = x + rate * delta_x;
if (objFunc.smooth_step(x, x1))
if (objFunc.after_line_search_custom_operation(x, x1))
objFunc.solution_changed(x1);

Check warning on line 433 in src/polysolve/nonlinear/Solver.cpp

View check run for this annotation

Codecov / codecov/patch

src/polysolve/nonlinear/Solver.cpp#L433

Added line #L433 was not covered by tests
x = x1;
}
Expand Down

0 comments on commit 5e8eb3d

Please sign in to comment.