From a414ac3109103912ff043836a9d61a95fae7cb18 Mon Sep 17 00:00:00 2001 From: LaSalle Date: Wed, 8 Apr 2026 16:07:16 -0400 Subject: [PATCH] made set_successful_iterate conditional on successful boundary targeting, if bound is it --- src/PALC/correction.jl | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/PALC/correction.jl b/src/PALC/correction.jl index 2c48c21..390644f 100644 --- a/src/PALC/correction.jl +++ b/src/PALC/correction.jl @@ -98,17 +98,18 @@ function palc_correction!( # Print trace if desired print_correction_trace(cache, trace, 3) else - # Update cache without pushing solution to curve - set_successful_iterate!(cache, uλ, false) - - # Print trace if desired - print_correction_trace(cache, trace, 3) # Target solution on boundary flag = palc_target_solution_on_boundary!(cache, hit_bnd, solvers, trace) # If targeting solution on boundary was successful, we're done. Otherwise, reduce ds if flag + # Only set successful if targeting worked + # Update cache without pushing solution to curve + set_successful_iterate!(cache, uλ, false) + + # Print trace if desired + print_correction_trace(cache, trace, 3) done = true else hit_bnd = NaN @@ -256,17 +257,17 @@ function palc_correction!( # Print trace if desired print_correction_trace(cache, trace, 3) else - # Update cache without pushing solution to curve - set_successful_iterate!(cache, uλ, false) - - # Print trace if desired - print_correction_trace(cache, trace, 3) # Target solution on boundary flag = palc_target_solution_on_boundary!(cache, hit_bnd, solvers, trace) # If targeting solution on boundary was successful, we're done. Otherwise, reduce ds if flag + # Update cache without pushing solution to curve + set_successful_iterate!(cache, uλ, false) + + # Print trace if desired + print_correction_trace(cache, trace, 3) done = true else hit_bnd = NaN