Unify error estimation under dispatched calculate_error_estimate!#3650
Conversation
Generic IMEX/SDIRK uses btilde-based dispatch on ESDIRKIMEXCache; IE and Trapezoid get specialized dispatches doing divided-difference estimates.
|
This is step 1, but then put it into the tableau form? |
|
sorry i misinterpreted message i am still doing it |
ESDIRKIMEXTableau gains a 4th type parameter for error-estimate kind (:standard / :ie_dd2 / :trap_dd3). calculate_error_estimate! dispatches on it. ESDIRKIMEXCache absorbs IE/Trap-specific fields as optional. The specialized IE/Trap cache types and perform_step methods are removed.
… master" This reverts commit c934073.
…orm" This reverts commit 299078b.
…form" This reverts commit c9e6d7a.
…h master" This reverts commit 2a3bcd3.
IE itself routes through ESDIRKIMEXCache via _PureSDIRKAlg alg_cache; the legacy struct + perform_step methods are retained because BDF's ABDF2 constructs and dispatches on ImplicitEulerCache directly.
alg_extrapolates algorithms (IE/Trap/SDIRK22) need integrator.uprev2 to track u's size. Holding it as an aliased cache field puts it in full_cache so resize!() propagates.
|
All 6 cases now match SDIRK convergence + DAE suites also pass cleanly ( |
Fixes OOP IE error estimate which reads integrator.u.
|
What was the next things you were planning on going for? |
|
Next up is migrating CFNLIRK3 — the one remaining SDIRK algorithm with its own cache + perform_step (everything else now routes through ESDIRKIMEXCache + the generic _perform_step_iip!/_oop!). I've already done the work on a separate branch — built CFNLIRK3ESDIRKIMEXTableau, added it to _PureSDIRKAlg, deleted the legacy CFNLIRK3Cache/CFNLIRK3ConstantCache + tableau + perform_step methods. Step counts on the split exponential test match master bit-exactly (naccept=64, nf=577, nf2=192 for both IIP and OOP). PR coming shortly. |
|
After that the only non-generic thing left in the SDIRK package would be ImplicitEulerCache/ImplicitEulerConstantCache, which we keep as a compat shim because OrdinaryDiffEqBDF's ABDF2 imports and constructs them directly. Migrating that would need a coordinated change in BDF — happy to do it as a follow-up if you want. |
|
Do an update to ABDF2 so it uses the updated ImplicitEuler stuff. Also need to make sure that is well-tested to keep the same performance etc. since first order is the hardest to not add overhead. Then make an issue for those step predictor things I mentioned. That's a good set of improvements to do to SDIRK once it's all in tableau form. But on the other side, start looking at #2757 #3564. Improving nonlinearsolvealg would be the most impactful direction. |
|
Sounds good will start with ABDF2. |
Generic IMEX/SDIRK uses btilde-based dispatch on ESDIRKIMEXCache; IE and Trapezoid get specialized dispatches doing divided-difference estimates.
Checklist
contributor guidelines, in particular the SciML Style Guide and
COLPRAC.
Additional context
Add any other context about the problem here.