Skip to content

🤖 Fix some adaptive sync points - #112

Merged
termi-official merged 9 commits into
mainfrom
do/fix-adaptive-sync
Aug 24, 2026
Merged

termi-official merged 9 commits into
mainfrom
do/fix-adaptive-sync

Conversation

@termi-official

@termi-official termi-official commented Aug 12, 2026 •

Copy link
Copy Markdown
Collaborator
  • Use SciMLLogging

@termi-official termi-official changed the title Fix some adaptive sync points 🤖 Fix some adaptive sync points Aug 12, 2026
@termi-official

Copy link
Copy Markdown
Collaborator Author

From the Gray-Scott demo some benchmarks done by Claude

Fixed-diffusion matrix — no, we are not good, and predictably so

Completing the matrix (T=200, refinement 2, new sync everywhere):

┌─────────────┬───────────┬──────────┬───────────────┬────────────────┬─────────┬────────────┬──────┐
│     tol     │ diffusion │ reaction │ outer acc/rej │ diff steps/rej │ diff nw │ rel L2 err │ time │
├─────────────┼───────────┼──────────┼───────────────┼────────────────┼─────────┼────────────┼──────┤
│ (1e-5,1e-4) │ adaptive  │ adaptive │ 338/9         │ 7628/18        │ 7286    │ 3.31e-4    │ 416s │
├─────────────┼───────────┼──────────┼───────────────┼────────────────┼─────────┼────────────┼──────┤
│             │ adaptive  │ fixed    │ 337/12        │ 7759/21        │ 7286    │ 3.85e-4    │ 403s │
├─────────────┼───────────┼──────────┼───────────────┼────────────────┼─────────┼────────────┼──────┤
│             │ fixed     │ adaptive │ 344/101       │ 890/0          │ 165     │ 2.95e-3    │ 9s   │
├─────────────┼───────────┼──────────┼───────────────┼────────────────┼─────────┼────────────┼──────┤
│             │ fixed     │ fixed    │ 343/101       │ 888/0          │ 164     │ 2.96e-3    │ 8s   │
├─────────────┼───────────┼──────────┼───────────────┼────────────────┼─────────┼────────────┼──────┤
│ (1e-6,1e-5) │ adaptive  │ adaptive │ 1116/159      │ 20929/22       │ 19813   │ 7.01e-5    │ 815s │
├─────────────┼───────────┼──────────┼───────────────┼────────────────┼─────────┼────────────┼──────┤
│             │ adaptive  │ fixed    │ 1123/187      │ 21429/21       │ 19813   │ 8.64e-5    │ 543s │
├─────────────┼───────────┼──────────┼───────────────┼────────────────┼─────────┼────────────┼──────┤
│             │ fixed     │ adaptive │ 1129/393      │ 3044/0         │ 602     │ 2.81e-3    │ 27s  │
├─────────────┼───────────┼──────────┼───────────────┼────────────────┼─────────┼────────────┼──────┤
│             │ fixed     │ fixed    │ 1128/394      │ 3044/0         │ 601     │ 2.85e-3    │ 30s  │
└─────────────┴───────────┴──────────┴───────────────┴────────────────┴─────────┴────────────┴──────┘

The error stalls at ~2.8–3.0e-3 and does not respond to a 10× tolerance tightening (2.95e-3 → 2.81e-3) — identical to the stall we measured before any of the fixes. That's expected: the cap and reset repair the adaptive-child controller pathologies, and a fixed child has no controller to repair. What breaks here is the structural failure mode — the diffusion error at one-step-per-substep is invisible to the pair difference, so the outer controller can't see or control it. The asymmetry with fixed-Heun is exactly the accuracy-scale rule: reaction's natural step ≥ substep (fixed is fine), diffusion's is ~substep/6 (fixed is not).

So the controllers are still failing and this needs another look.

@termi-official
termi-official merged commit 31b2ec6 into main Aug 24, 2026
10 checks passed
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.

1 participant