Skip to content

Add StrangMarchuk second-order symmetric operator splitting#73

Merged
termi-official merged 8 commits into
SciML:mainfrom
oameye:add-strang-marchuk
May 13, 2026
Merged

Add StrangMarchuk second-order symmetric operator splitting#73
termi-official merged 8 commits into
SciML:mainfrom
oameye:add-strang-marchuk

Conversation

@oameye
Copy link
Copy Markdown
Contributor

@oameye oameye commented May 9, 2026

Summary

Implements the classical Strang-Marchuk ABA splitting scheme as requested in #10. For two operators A and B, the scheme performs A(Δt/2) → B(Δt) → A(Δt/2), achieving second-order accuracy through symmetry.

  • Added StrangMarchuk algorithm struct with inner constructor validating exactly 2 operators
  • Cache, init_cache, and _perform_step! in src/solver.jl
  • Exported StrangMarchuk from the main module
  • Handles floating-point time drift from two half-steps via try_snap_children_to_tstop!
  • Handles instability detection (NaN propagation between sub-steps) gracefully
  • Added Strang 1968 and Marchuk 1971 bibliography entries
  • Added StrangMarchuk precompilation workload
  • Updated docs: API reference, usage example, and theory section with convergence analysis

References

  • G. Strang, On the construction and comparison of difference schemes, SIAM J. Numer. Anal. 5 (1968), pp. 506–517
  • G. I. Marchuk, On the theory of the splitting-up method, in Numerical Solution of Partial Differential Equations-II, Academic Press, 1971, pp. 469–500

Closes #10

Test plan

  • All existing LieTrotterGodunov tests pass unchanged (1736 total)
  • StrangMarchuk integrated into existing test loops alongside LTG
  • Convergence order test with non-commuting operators confirms first-order (LTG) vs second-order (SM)
  • Nested splitting tests (StrangMarchuk wrapping StrangMarchuk)
  • Adaptive solver wrapper tests (FakeAdaptiveSM)
  • Reinit and TimeChoiceIterator tests
  • Instability detection tests (NaN propagation)
  • Full test suite passes locally

oameye added 4 commits May 9, 2026 08:19
Implement the classical ABA scheme for two operators A and B:
A(dt/2) → B(dt) → A(dt/2), achieving second-order accuracy through
symmetry.

Closes SciML#10
Remove separate StrangMarchuk testset and instead add it to the main
convergence and adaptive test loops alongside LieTrotterGodunov. This
gives StrangMarchuk the same coverage: all nested splitting
combinations, FakeAdaptive wrapper, and adaptive mode tests.
…, bibliography

- Validate StrangMarchuk requires exactly 2 inner algorithms
- Add convergence order test with non-commuting operators to verify
  first-order (LTG) vs second-order (SM) splitting accuracy
- Add StrangMarchuk precompilation workload
- Add Strang 1968 and Marchuk 1971 bibliography entries
- Remove accidental OrdinaryDiffEqTsit5 from [deps]
Copy link
Copy Markdown
Collaborator

@termi-official termi-official left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting is needed and I left a comment.

Comment thread docs/src/usage/index.md Outdated
oameye added 2 commits May 10, 2026 07:40
Replace the hardcoded 2-operator implementation with a general
N-operator palindromic sweep using @unroll, matching LTG's style.
Add 3-operator test verifying iteration counts and solution accuracy.
Update docs and docstrings for the general scheme.
Comment thread src/solver.jl Outdated
Comment thread src/solver.jl Outdated
Copy link
Copy Markdown
Collaborator

@termi-official termi-official left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for ironing out the details here and adding the order tests!!

@termi-official termi-official merged commit 23f5c9b into SciML:main May 13, 2026
3 checks passed
@oameye
Copy link
Copy Markdown
Contributor Author

oameye commented May 22, 2026

Can we tag a release?

@termi-official
Copy link
Copy Markdown
Collaborator

@oscardssmith

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.

Strang-Marchuk

2 participants