Commit d114d04
committed
Fix nf stat tracking in initdt and remove unnecessary DAE guard from DefaultInitDt
- Track integrator.stats.nf directly in each initdt function instead of
hardcoding increment_nf!(stats, 2) in auto_dt_reset!. This correctly
tracks the variable number of f calls in StiffInitDt (which makes 1+N
calls depending on iteration count) vs DefaultInitDt (always 2 calls).
Fixes InterfaceIII stats_tests failures.
- Remove DAE guard from DefaultInitDt (both in-place and out-of-place).
DefaultInitDt is only dispatched for explicit algorithms which never
have isdae=true. The guard was causing issues for DAE problems that
could end up in DefaultInitDt through fallback paths, returning
h=0.001*tdist which was too large for stiff problems like ROBER.
StiffInitDt retains its DAE guard since implicit/DAE algorithms
dispatch there.
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>1 parent 141aade commit d114d04
2 files changed
Lines changed: 10 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | 31 | | |
41 | 32 | | |
42 | 33 | | |
| |||
74 | 65 | | |
75 | 66 | | |
76 | 67 | | |
| 68 | + | |
77 | 69 | | |
78 | 70 | | |
79 | 71 | | |
| |||
207 | 199 | | |
208 | 200 | | |
209 | 201 | | |
| 202 | + | |
210 | 203 | | |
211 | 204 | | |
212 | 205 | | |
| |||
310 | 303 | | |
311 | 304 | | |
312 | 305 | | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | 306 | | |
323 | 307 | | |
324 | 308 | | |
325 | 309 | | |
| 310 | + | |
326 | 311 | | |
327 | 312 | | |
328 | 313 | | |
| |||
348 | 333 | | |
349 | 334 | | |
350 | 335 | | |
| 336 | + | |
351 | 337 | | |
352 | 338 | | |
353 | 339 | | |
| |||
440 | 426 | | |
441 | 427 | | |
442 | 428 | | |
| 429 | + | |
443 | 430 | | |
444 | 431 | | |
445 | 432 | | |
| |||
573 | 560 | | |
574 | 561 | | |
575 | 562 | | |
| 563 | + | |
576 | 564 | | |
577 | 565 | | |
578 | 566 | | |
| |||
715 | 703 | | |
716 | 704 | | |
717 | 705 | | |
| 706 | + | |
718 | 707 | | |
719 | 708 | | |
720 | 709 | | |
| |||
774 | 763 | | |
775 | 764 | | |
776 | 765 | | |
| 766 | + | |
777 | 767 | | |
778 | 768 | | |
779 | 769 | | |
| |||
798 | 788 | | |
799 | 789 | | |
800 | 790 | | |
| 791 | + | |
801 | 792 | | |
802 | 793 | | |
803 | 794 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
516 | 516 | | |
517 | 517 | | |
518 | 518 | | |
519 | | - | |
| 519 | + | |
520 | 520 | | |
521 | 521 | | |
522 | 522 | | |
| |||
0 commit comments