Skip to content

Commit

Permalink
Removed nan setting
Browse files Browse the repository at this point in the history
  • Loading branch information
zfergus committed Feb 8, 2024
1 parent ba80533 commit 1d5566b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/polysolve/nonlinear/Problem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace polysolve::nonlinear
class Problem
{
public:
static const int Dim = Eigen::Dynamic;
static constexpr int Dim = Eigen::Dynamic;
using Scalar = double;
using TVector = Eigen::Matrix<Scalar, Dim, 1>;
using TMatrix = Eigen::Matrix<Scalar, Dim, Dim>;
Expand Down
11 changes: 1 addition & 10 deletions src/polysolve/nonlinear/Solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,17 +286,10 @@ namespace polysolve::nonlinear
update_solver_info(objFunc(x));
objFunc.post_step(PostStepData(m_current.iterations, solver_info, x, grad));

// Used for logging
// double xDelta = 0, gradNorm = 0;

do
{
m_line_search->set_is_final_strategy(m_descent_strategy == m_strategies.size() - 1);

m_current.xDelta = NaN;
m_current.fDelta = NaN;
m_current.gradNorm = NaN;

// --- Energy ------------------------------------------------------

double energy;
Expand Down Expand Up @@ -390,9 +383,7 @@ namespace polysolve::nonlinear
if (m_status != Status::Continue)
break;

// ---------------
// Variable update
// ---------------
// --- Variable update ---------------------------------------------

m_logger.trace(
"[{}][{}] pre LS iter={:d} f={:g} ‖∇f‖={:g}",
Expand Down

0 comments on commit 1d5566b

Please sign in to comment.