Repository navigation
incorporate time/stab filter for larger steps in FBDF - #3878
Conversation
|
Test 1: Exp decay u'=-u, t=[0,10], exact=exp(-10), accuracy-limited Algorithm tol steps nf err err/tol avg_dt retcode FBDF 1e-04 48 55 1.027e-05 0.10 2.083e-01 Success FBDF 1e-06 84 122 7.760e-08 0.08 1.190e-01 Success FBDF 1e-08 188 201 8.130e-11 0.01 5.319e-02 Success FBDF 1e-10 423 538 5.210e-11 0.52 2.364e-02 Success |
|
@ChrisRackauckas : Could you please review this PR? |
1 similar comment
|
@ChrisRackauckas : Could you please review this PR? |
|
I'm fixing this up, it was an accidental merge. |
* Add the FBDF time filter helpers and their cache workspace The time/stab filter merged in #3878 called `backdiff`, `bdf_and_filt_coeff` and `bdf3stab_coeff`, none of which existed, so `FBDF(time_filter = true)` threw and JET's typo pass flagged the undefined globals. Add them in in-place form, together with the small divided-difference and step-ratio kernels the filter needs, and preallocate their time/coefficient buffers on both FBDF caches so the filter does not allocate per step. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Cursor Agent <[email protected]> Agent-Harness: Cursor Agent-Model: claude-opus-5-thinking-high Agent-Session: local OrdinaryDiffEq fbdf-time-filter-finish Co-authored-by: Cursor <[email protected]> * Enable the FBDF time filter for in-place problems The filter was only wired into the out-of-place `perform_step!`, so `FBDF(time_filter = true)` silently fell back to plain FBDF for in-place problems. Lift both paths into `_fbdf_time_filter`/`_fbdf_time_filter!` with the same candidate selection, reusing the `u₀`/`terk_tmp`/`terkp1_tmp` scratch that is already dead by the time the error estimates are in, so the in-place path stays allocation free. The in-place step derives `fsallast` from the converged Newton condition rather than calling `f`, which is only valid at the nonlinear solution, so the filter now evaluates `f` itself whenever it moves `u`, and reuses that evaluation for its own residual-based error estimate. The order-4 candidate is skipped at `k == max_order` so the filter cannot emit a solution above the requested order, and the residual estimate falls back to halving the lower-order one under a mass matrix, where the identity it relies on does not hold. The out-of-place error estimates need no pre-filter copy since nothing between the solve and the filter mutates `u`. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Cursor Agent <[email protected]> Agent-Harness: Cursor Agent-Model: claude-opus-5-thinking-high Agent-Session: local OrdinaryDiffEq fbdf-time-filter-finish Co-authored-by: Cursor <[email protected]> * Cover the FBDF time filter from the Core test group `fbdf_filter_accuracy.jl` was a benchmarking script that nothing ran, so it could not catch the missing helpers. Replace it with a test that exercises both the in-place and out-of-place filter paths on smooth, stiff and mass matrix problems, and pins the opt-in default by checking that `time_filter = false` reproduces plain `FBDF()` exactly. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Cursor Agent <[email protected]> Agent-Harness: Cursor Agent-Model: claude-opus-5-thinking-high Agent-Session: local OrdinaryDiffEq fbdf-time-filter-finish Co-authored-by: Cursor <[email protected]> * Correct FBDF filter weights, candidate control, and restart history Derive the order-raising correction from the actual fixed-coefficient solve on unequal steps. Keep each candidate's state, derivative, error estimate, and reported order together, preserve BDF3-Stab at max_order=3, and use the selected order in step-size control. Repair filtered fixed-step history, restart bookkeeping, and dense output. Reject unsupported mass-matrix filtering explicitly and document the numerical and performance limits. The original PR fails 42 of the 70 primary regression assertions. The fixed implementation passes all 314 targeted assertions, including irregular-grid local convergence, candidate control, dense output, callbacks, and restarts. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.153.4 Agent-Model: gpt-6-astra Agent-Session: local transcript /home/crackauc/.codex/sessions/2026/09/08/rollout-2026-09-08T04-52-13-01a08037-c26f-7662-aece-ff6e2be97b48.jsonl * Use the owning module for public solver APIs in filter tests Qualify the Core controller and interpolation functions through their public owner. The aliases resolve to identical function objects; all 314 targeted assertions still pass. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.153.4 Agent-Model: gpt-6-astra Agent-Session: local transcript /home/crackauc/.codex/sessions/2026/09/08/rollout-2026-09-08T04-52-13-01a08037-c26f-7662-aece-ff6e2be97b48.jsonl --------- Co-authored-by: ChrisRackauckas-Claude <[email protected]> Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: Codex <[email protected]>
- Precompile SDE solves through specialization levels (#4467) - Add 32-bit InterfaceI CI lane via test_groups.toml (#4480) - incorporate time/stab filter for larger steps in FBDF (#3878) - Keep 32-bit CI lane hard-failing. (#4482) - Correct and validate FBDF time and stability filters (#4484) - Keep DAE init from overwriting uprev during callback truncation (#4486) - DiffEqBase: Int64 interp_points range length for 32-bit (#4487) - Release OrdinaryDiffEqBDF 2.4.7 (#4490) - Unify companion global error estimators into GlobalErrorEstimation (#4492) - Add adjoint-based global error control as a SciMLSensitivity extension (#3953) Agent-Harness: Claude Code Agent-Model: claude-opus-5[1m] Claude-Session: https://claude.ai/code/session_014FEzNTLFutCmTEAZ3zBg5R Co-authored-by: Claude Opus 5 (1M context) <[email protected]>

Checklist
This is my first attempt to incorporate the time/stab filter to fbdf methods.