Repository navigation
Use the active member's alg and cache for QNDF in a CompositeAlgorithm - #4959
singhharsh1708 wants to merge 6 commits into
Conversation
8524267 to
aec034a
Compare
aec034a to
b81b7f9
Compare
PR: #4959 Reviewed head: b81b7f9 Risk assessment
Review reportVERDICT: CHANGES Riskhigh (H4: the new QA exclusion exempts the introduced private-API calls from the existing public-access check). Blocking findings
Non-blocking findings
What I ran
What I did not verify
Head link: b81b7f9 🤖 Posted by an AI agent — harness: codex-cli 0.164.0 · model: gpt-6.1-sol |
AutoTsit5(QNDF())threw on its first QNDF step (#4953). The QNDF error constant readintegrator.algandintegrator.cache, and the out-of-place step setintegrator.cache.nconsteps; inside aCompositeAlgorithmthose are the composite, not QNDF. The step now passes its ownalgandcache.γₖtoqndf_error_constant, and setscache.nconsteps.Once it ran, it was inaccurate. Inside a composite,
set_EEst!writes theCompositeControllerCacheEEst, butaccept_step_controllerforBDFControllerCacheread the member cache's EEst, which stays at 1, so every QNDF, FBDF and DFBDF step inside a composite was accepted. It now readsget_EEst(integrator), like the generic fallback; standalone solves are unchanged, since there both are the same cache. The default algorithm is also affected when it switches to FBDF.At reltol 1e-6 and abstol 1e-8, comparing the crash fix alone with this PR: on Van der Pol with mu = 1e3 against Rodas5P at 1e-12,
AutoTsit5(QNDF())goes from 0.061 to 1.8e-5 in place and from 0.150 to 4.2e-6 out of place, andAutoTsit5(FBDF())from 8.3e-4 to 1.7e-4. On ROBER,AutoTsit5(QNDF())goes from 9.1e-6 to 2.1e-7. The default solver on a 100-point heat equation goes from 1.4e-4 to 7.8e-7 max error against the exact solution. Standalone QNDF, FBDF and DFBDF give identical results before and after.The new testset in
composite_algorithm_test.jlfails on master; with only the controller line reverted, 4 of its 14 checks fail. BDF goes to 2.4.15; Core is unchanged. The sameget_EEst(cache)read remains in the Nordsieck controllers and Core'sDummyControllerCache, andAutoTsit5(NordsieckBDF())still crashes; those are separate.Fixes #4953
AI Disclosure: Claude assisted with this change.