Skip to content

SDIRK tests: probe ImplicitEuler NLNewton default κ (no product change) - #3855

Closed
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix/impliciteuler-pds-statics
Closed

ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix/impliciteuler-pds-statics

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Jul 9, 2026 •

Copy link
Copy Markdown
Member

This PR should be ignored until reviewed by @ChrisRackauckas.

Summary

Removes the proposed product-level change of ImplicitEuler default from NLNewton() (κ = 1//100) to NLNewton(κ = 1//10000).

That default change was a workaround for one static-array production–destruction (PDS) case. It hid false Newton acceptance under Success retcodes rather than fixing a general ImplicitEuler regression. Nothing in master required a special ImplicitEuler default; other SDIRK methods still use κ = 1//100.

What the default change was (now dropped)

# proposed (DROPPED)
ImplicitEuler(; nlsolve = NLNewton(κ = 1 // 10000), ...)

# kept (historical; matches Trapezoid / TRBDF2 / NLNewton())
ImplicitEuler(; nlsolve = NLNewton(), ...)  # κ = 1//100

Tests instead (local: ALL_DEFAULT_TESTS_OK)

impliciteuler_nlnewton_default_tests.jl probes whether the historical default makes sense:

Case Under default κ=1//100
Product default == NLNewton().κ yes (1//100)
Robertson + linear stiff ODE adequate
Static-array stratospheric closed-form RHS physical
Static-array stratospheric PDS form Success but catastrophic RHS↔PDS divergence (δ~1e11)
Same PDS + call-site κ=1//10000 equivalence restored
Same PDS + dt=0.1, default κ ok (step size compensates)
Same PDS + tighter abstol/reltol only still broken
PositiveIntegrators-style call site ImplicitEuler(nlsolve=NLNewton(κ=1//10000))

Conclusion: default κ is fine for ordinary stiff ODEs; hard static-array PDS needs call-site Newton settings, not a product default change.

Test-only (+ StaticArrays test dep). No algorithms.jl / version bump.

Drop the proposed global ImplicitEuler default of NLNewton(κ=1//10000).
That was a product-level workaround for one static-array PDS case and hid
false Newton acceptance under Success retcodes.

Keep historical defaults (κ=1//100, same as Trapezoid/TRBDF2/NLNewton).

Add impliciteuler_nlnewton_default_tests.jl that:
- asserts the product default matches NLNewton()
- checks default κ on Robertson + linear stiff ODE (adequate)
- documents that default κ fails static-array stratospheric PDS (Success
  but catastrophic RHS↔PDS divergence)
- shows call-site κ=1//10000 (and 1e-10) restores equivalence
- κ-sweeps physical match quality
- shows smaller dt can compensate for loose κ
- shows tighter abstol/reltol alone does not fix default-κ PDS
- records the PositiveIntegrators-style call-site pattern

Test-only (StaticArrays test dep); no algorithms.jl / version change.

Co-Authored-By: Chris Rackauckas <[email protected]>
@ChrisRackauckas-Claude
ChrisRackauckas-Claude force-pushed the fix/impliciteuler-pds-statics branch from af8aaca to d7030c0 Compare July 10, 2026 07:51
@ChrisRackauckas-Claude ChrisRackauckas-Claude changed the title SDIRK: tighter ImplicitEuler Newton κ + static PDS regression SDIRK tests: probe ImplicitEuler NLNewton default κ (no product change) Jul 10, 2026
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