@@ -312,7 +312,8 @@ void PDLPSolver::solve(std::vector<double>& x, std::vector<double>& y) {
312312 const double op_norm_sq = PowerMethod ();
313313 step_.passLp (&lp_);
314314 step_.passLogOptions (¶ms_.log_options_ );
315- step_.passDebugLogFile (debug_pdlp_log_file_);
315+ step_.passDebugPdlpLogFile (debug_pdlp_log_file_);
316+ step_.passDebugPdlpData (&debug_pdlp_data_);
316317 StepSizeConfig step_size =
317318 step_.InitializeStepSizesPowerMethod (lp, op_norm_sq);
318319 const double fixed_eta = 0.99 / sqrt (op_norm_sq);
@@ -334,7 +335,8 @@ void PDLPSolver::solve(std::vector<double>& x, std::vector<double>& y) {
334335
335336 // --- 1. Initialization ---
336337 restart_scheme_.passLogOptions (&working_params.log_options_ );
337- restart_scheme_.passDebugLogFile (debug_pdlp_log_file_);
338+ restart_scheme_.passDebugPdlpLogFile (debug_pdlp_log_file_);
339+ restart_scheme_.passDebugPdlpData (&debug_pdlp_data_);
338340 Initialize (lp, x, y); // Sets initial x, y and results_
339341 restart_scheme_.passParams (&working_params);
340342 restart_scheme_.Initialize (results_);
@@ -364,8 +366,11 @@ void PDLPSolver::solve(std::vector<double>& x, std::vector<double>& y) {
364366 logger_.print_iteration_header ();
365367
366368 // --- 2. Main PDHG Loop ---
369+ debugPdlpIterHeaderLog (debug_pdlp_log_file_);
370+ debugPdlpDataInitialise (&debug_pdlp_data_);
371+
367372 for (int iter = 0 ; iter < params_.max_iterations ; ++iter) {
368- debugPdlpIterLog (debug_pdlp_log_file_, iter, restart_scheme_.getBeta ());
373+ debugPdlpIterLog (debug_pdlp_log_file_, iter, &debug_pdlp_data_, restart_scheme_.getBeta ());
369374
370375 // Check time limit
371376 if (solver_timer.read () > params_.time_limit ) {
@@ -475,11 +480,9 @@ void PDLPSolver::solve(std::vector<double>& x, std::vector<double>& y) {
475480 linalg::ATy (lp, y_current_, ATy_current);
476481 }
477482
478- // Print Ax norm for debugging
479- double ax_norm = linalg::vector_norm (Ax_current);
480- double axavg_norm = linalg::vector_norm (Ax_avg);
481- debugPdlpAxNormLog (debug_pdlp_log_file_, ax_norm);
482- debugPdlpAxavgNormLog (debug_pdlp_log_file_, axavg_norm);
483+ // Record Ax norm for debugging
484+ debug_pdlp_data_.ax_norm = linalg::vector_norm (Ax_current);
485+ debug_pdlp_data_.ax_average_norm = linalg::vector_norm (Ax_avg);
483486
484487 // --- 5. Core PDHG Update Step ---
485488 bool step_success = true ;
0 commit comments