Skip to content

Commit c4e765c

Browse files
Revert SUNDIALS curvature threshold, use formula-always approach
The SUNDIALS yddnrm*hub^2>2 threshold is designed for sqrt(2/yddnrm) (p+1=2) but doesn't work for order-dependent (2/yddnrm)^(1/(p+1)). High-order methods (p=5+) almost never trigger the formula, falling back to tiny geometric mean steps. Use formula-always-with-hub-clamp: when yddnrm > 0 compute the order-dependent step and clamp to hub; when yddnrm == 0 use hub. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 077dcc9 commit c4e765c

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

lib/OrdinaryDiffEqCore/src/initdt.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -395,10 +395,6 @@
395395
yddnrm = internalnorm(tmp, t) / hg * oneunit_tType
396396

397397
# Order-dependent step proposal: h ~ (2/yddnrm)^(1/(p+1))
398-
# Always use the formula and clamp to hub, rather than falling back
399-
# to the conservative geometric mean sqrt(hg*hub). This prevents
400-
# overly small initdt for high-order explicit methods where the
401-
# formula naturally gives hnew > hub.
402398
if DiffEqBase.value(yddnrm) > 0
403399
hnew = convert(
404400
_tType,

0 commit comments

Comments
 (0)