@@ -283,7 +283,7 @@ namespace polysolve::nonlinear
283283
284284 m_logger.debug (
285285 " Starting {} with {} solve f₀={:g} (stopping criteria: {})" ,
286- descent_strategy_name (), m_line_search->name (), objFunc (x), m_stop);
286+ descent_strategy_name (), m_line_search->name (), objFunc (x), m_stop. print_message () );
287287
288288 update_solver_info (objFunc (x));
289289 objFunc.post_step (PostStepData (m_current.iterations , solver_info, x, grad));
@@ -354,12 +354,12 @@ namespace polysolve::nonlinear
354354 m_status = Status::UpdateDirectionFailed;
355355 log_and_throw_error (
356356 m_logger, " [{}][{}] {} on last strategy; stopping" ,
357- current_name, m_line_search->name (), m_status);
357+ current_name, m_line_search->name (), status_message ( m_status) );
358358 }
359359
360360 m_logger.debug (
361361 " [{}][{}] {}; reverting to {}" , current_name, m_line_search->name (),
362- Status::UpdateDirectionFailed, descent_strategy_name ());
362+ status_message ( Status::UpdateDirectionFailed) , descent_strategy_name ());
363363 m_status = Status::Continue;
364364 continue ;
365365 }
@@ -378,15 +378,15 @@ namespace polysolve::nonlinear
378378 m_status = Status::NotDescentDirection;
379379 log_and_throw_error (
380380 m_logger, " [{}][{}] {} on last strategy (‖Δx‖={:g}; ‖g‖={:g}; Δx⋅g={:g}≥0); stopping" ,
381- current_name, m_line_search->name (), m_status, delta_x.norm (), compute_grad_norm (x, grad),
381+ current_name, m_line_search->name (), status_message ( m_status) , delta_x.norm (), compute_grad_norm (x, grad),
382382 m_current.xDeltaDotGrad );
383383 }
384384 else
385385 {
386386 m_status = Status::Continue;
387387 m_logger.debug (
388388 " [{}][{}] {} (‖Δx‖={:g}; ‖g‖={:g}; Δx⋅g={:g}≥0); reverting to {}" ,
389- current_name, m_line_search->name (), Status::NotDescentDirection,
389+ current_name, m_line_search->name (), status_message ( Status::NotDescentDirection) ,
390390 delta_x.norm (), compute_grad_norm (x, grad), m_current.xDeltaDotGrad ,
391391 descent_strategy_name ());
392392 }
@@ -477,7 +477,7 @@ namespace polysolve::nonlinear
477477
478478 m_logger.debug (
479479 " [{}][{}] {} (stopping criteria: {})" ,
480- descent_strategy_name (), m_line_search->name (), m_current, m_stop);
480+ descent_strategy_name (), m_line_search->name (), m_current. print_message () , m_stop. print_message () );
481481
482482 if (++m_current.iterations >= m_stop.iterations )
483483 m_status = Status::IterationLimit;
@@ -499,8 +499,8 @@ namespace polysolve::nonlinear
499499 m_logger.log (
500500 succeeded ? spdlog::level::info : spdlog::level::err,
501501 " [{}][{}] Finished: {} took {:g}s ({}) (stopping criteria: {})" ,
502- descent_strategy_name (), m_line_search->name (), m_status, tot_time,
503- m_current, m_stop);
502+ descent_strategy_name (), m_line_search->name (), status_message ( m_status) , tot_time,
503+ m_current. print_message () , m_stop. print_message () );
504504
505505 log_times ();
506506 update_solver_info (objFunc (x));
0 commit comments