Repository navigation
Os/imex mri sr - #111
Os/imex mri sr#111oscardssmith wants to merge 6 commits into
Conversation
Implements the practical parts of Auzinger, Hofstaetter, Ketcheson & Koch, BIT 57:55-74 (2017): coefficient-table splitting schemes and the section 3 adjoint-pair local error estimator. Backward substeps. Every real splitting scheme of order three or above has negative coefficients, so some substeps run against the tree's direction -- previously unsupported, because a child's direction is fixed at construction and the stepping loop re-signs dt back before perform_step! sees it. reverse_direction! flips a leaf's tdir, dt, dtcache, dtpropose and dtmax and rebuilds its tdir-keyed heaps. A splitting node needs different handling: its heap stores raw times with the direction in the heap's type, so keys cannot be re-signed and only behind-times are dropped, and the reversal recurses into the subtree because add_tstop! propagates to descendants eagerly. Coefficient tables. SplittingCoefficients holds an s-by-N table as nested NTuples, checking each operator's consistency condition at construction. Ruth3 is the first table (exactly rational, order 3). One generic _perform_step! walks stages by operators and skips zero coefficients. LieTrotterGodunov and StrangMarchuk keep their hand-written steps. AdjointPair(base) averages a base scheme of odd order p with its adjoint for a solution of order p+1, and takes half their difference as the error estimate driving the controller. Even-order bases are rejected: their leading error terms are equal rather than opposite, so averaging would raise no order and the difference would not be an error estimate. The adjoint reverses the base's whole flat sequence of flows, reusing the same table. AdjointPair(LieTrotterGodunov(...)) is PalindromicPairLieTrotterGodunov, which a test asserts to the bit. Also fixes a pre-existing bug the new schemes exposed: the snap window absorbing child clock drift was scaled by the child's own dt, which after a substep can be arbitrarily small and collapse the window below the drift it must absorb. It now uses the outer step size, the scale the drift accumulated against. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Yoshida's triple jump, derived in this package's stage convention rather than transcribed: composing three Strang steps of lengths w1*h, w0*h and w1*h and merging the adjacent operator-1 flows gives four stages and eight flow evaluations rather than nine. The merge zeroes the last stage's second coefficient, so this is also the first table to exercise the zero-coefficient skip in the generic step. Measured order 4.02, 4.00, 4.00 over dt 0.2 to 0.025. w0 is negative and large: the second operator's cumulative time reaches 1.35*h before returning through -0.35*h, so this leans hard on backward substeps. Being of even order, Yoshida4 cannot serve as an AdjointPair base, which is now asserted alongside the StrangMarchuk case. Ruth3's two-operator restriction is factored into a shared helper, since Yoshida4's table is also AB only. Also adds the three bibliography entries the docstrings had been citing without defining -- Rut:1983:cim, Yos:1990:cho and AuzHofKetKoc:2017:psm -- which would have failed the docs build. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The citation key AuzHofKetKoc:2017:psm splits into Auz/Hof/Ket/Koc, and typos reads "Ket" as a misspelling of "Kept" or "Key". Added alongside the existing "Tro" exception for the Trotter key. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
| @article{FisReyRob:2023:iem, | ||
| title={Implicit-explicit multirate infinitesimal stage-restart methods}, | ||
| author={Fish, Alex C. and Reynolds, Daniel R. and Roberts, Steven B.}, | ||
| journal={arXiv preprint arXiv:2301.00865}, | ||
| year={2023}, | ||
| doi={10.48550/arXiv.2301.00865} | ||
| } | ||
|
|
||
| @article{ChiRey:2021:iem, | ||
| title={Implicit-explicit multirate infinitesimal GARK methods}, | ||
| author={Chinomona, Rujeko and Reynolds, Daniel R.}, | ||
| journal={SIAM Journal on Scientific Computing}, | ||
| volume={43}, | ||
| number={5}, | ||
| pages={A3082--A3113}, | ||
| year={2021}, | ||
| doi={10.1137/20M1354349} | ||
| } | ||
|
|
||
| @article{SanGun:2015:gsa, | ||
| title={A generalized-structure approach to additive Runge--Kutta methods}, | ||
| author={Sandu, Adrian and G{\"u}nther, Michael}, |
There was a problem hiding this comment.
You've seen the OrdinaryDiffEqMultirate(Implicit) things?
There was a problem hiding this comment.
Yes, but they are still constrained to a subset of multi-rate solvers, right? In OrdinaryDIffEq we cannot sync the subintegrators using different algorithms (and related the easier to fix one is that I also didn't see a canonical way to use a split function with more than two components).
There was a problem hiding this comment.
Merging this into OrdinaryDiffEq is still an open todo, don't understand me wrong, and we can still move algorithms between subpackages. I just want the internals and interfaces to stability a bit before merging into the monorepo. I just do not want to cause any major trouble if I messed something up.
Verdict: changes needed before merge (reviewed at Adds the IMEX-MRI-SR2(1)/SR3(2) multirate methods of Fish–Reynolds–Roberts ( Risk assessment
Findings
Push a fix and the PR is reviewed again automatically at the new head. 🤖 Posted by an AI agent — harness: Claude Code · model: claude-opus-5-5[1m] (fleet master); review by Devin CLI (Mac) / fusion-claude-opus-5-5-high-sidekick-swe-2-medium |
On top of #109 (review) so not ready to merge yet.