← ClaudeAtlas

nonlinear-solverslisted

Select and configure nonlinear solvers for root-finding f(x)=0, optimization min F(x), and least-squares problems — choose among Newton, Newton-Krylov, quasi-Newton (BFGS, L-BFGS), Broyden, Anderson acceleration, and Levenberg-Marquardt methods, configure line search or trust-region globalization, diagnose convergence rate (quadratic, linear, stagnated), and assess Jacobian quality and conditioning. Use when a Newton solver converges slowly or diverges, choosing between line search and trust region, debugging nonlinear iteration failures in FEM or phase-field codes, or selecting a solver for large-scale unconstrained optimization, even if the user only says "my Newton iterations aren't converging."
HeshamFS/materials-simulation-skills · ★ 93 · AI & Automation · score 85
Install: claude install-skill HeshamFS/materials-simulation-skills
# Nonlinear Solvers ## Goal Provide a universal workflow to select a nonlinear solver, configure globalization strategies, and diagnose convergence for root-finding, optimization, and least-squares problems. ## Requirements - Python 3.10+ - NumPy (for Jacobian diagnostics) - SciPy (optional, for advanced analysis) ## Inputs to Gather | Input | Description | Example | |-------|-------------|---------| | Problem type | Root-finding, optimization, least-squares | `root-finding` | | Problem size | Number of unknowns | `n = 10000` | | Jacobian availability | Analytic, finite-diff, unavailable | `analytic` | | Jacobian cost | Cheap or expensive to compute | `expensive` | | Constraints | None, bounds, equality, inequality | `none` | | Smoothness | Is objective/residual smooth? | `yes` | | Residual history | Sequence of residual norms | `1,0.1,0.01,...` | ## Decision Guidance ### Solver Selection Flowchart ``` Is Jacobian available and cheap? ├── YES → Problem size? │ ├── Small (n < 1000) → Newton (full) │ └── Large (n ≥ 1000) → Newton-Krylov └── NO → Is objective smooth? ├── YES → Memory limited? │ ├── YES → L-BFGS or Broyden │ └── NO → BFGS └── NO → Anderson acceleration or Picard ``` ### Quick Reference | Problem Type | First Choice | Alternative | Globalization | |--------------|--------------|-------------|---------------| | Small root-finding | Newton | Broyden | Line search | | Large root-finding | Newton-Krylov | Anderson | Trust region | |