Draft
Fix Newton solver divergence in Moreau-Yosida thermoforming script#49
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
γ > 1e11as an additional break condition in the Moreau-Yosida outer loop — matching the identical safeguard already present inthermoforming_fixed_point.jlAt γ=8.36×10¹⁰ (the last successful solve), the Cauchy norm is 1.29×10⁻⁵ — effectively converged — so exiting here is mathematically sound.