Skip to content

Fix Newton solver divergence in Moreau-Yosida thermoforming script#49

Draft
jorgensd with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-github-actions-job-failure
Draft

Fix Newton solver divergence in Moreau-Yosida thermoforming script#49
jorgensd with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-github-actions-job-failure

Conversation

Copilot AI commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

The CI job run-script (ubuntu-24.04-arm, ghcr.io/methods-group/proximalgalerkin:v0.5.0) was failing because the Newton solver diverged when the Moreau-Yosida penalty parameter γ reached ~1.25×10¹², causing the Jacobian to become catastrophically ill-conditioned.

Root cause

The path-following outer loop grows γ by a factor of ~k per iteration. By outer iteration 12, γ hit 1.25×10¹², at which point the Newton residual jumped from 0.01 to 412 after two steps and never recovered (1000 iterations, no convergence).

Fix

  • Added γ > 1e11 as an additional break condition in the Moreau-Yosida outer loop — matching the identical safeguard already present in thermoforming_fixed_point.jl
# break if tolerance reached or γ is too large (Newton becomes ill-conditioned)
if cauchy[end] < 1e-5 || γ > 1e11
    break
end

At γ=8.36×10¹⁰ (the last successful solve), the Cauchy norm is 1.29×10⁻⁵ — effectively converged — so exiting here is mathematically sound.

Copilot AI changed the title [WIP] Fix failing GitHub Actions job run-script Fix Newton solver divergence in Moreau-Yosida thermoforming script Jul 9, 2026
Copilot AI requested a review from jorgensd July 9, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants