Skip to content

refactor(RKN): unify DPRKN/ERKN velocity-independent methods via Nyst…#3376

Open
singhharsh1708 wants to merge 4 commits intoSciML:masterfrom
singhharsh1708:rkn-tableau-refactor
Open

refactor(RKN): unify DPRKN/ERKN velocity-independent methods via Nyst…#3376
singhharsh1708 wants to merge 4 commits intoSciML:masterfrom
singhharsh1708:rkn-tableau-refactor

Conversation

@singhharsh1708
Copy link
Copy Markdown
Contributor

@singhharsh1708 singhharsh1708 commented Apr 10, 2026

Summary

Introduces NystromVITableau{T,T2} struct and generic NystromVICache / NystromVIConstantCache, eliminating 9 separate per-method cache structs and their per-method perform_step! implementations.

Moves velocity-independent Nyström (RKN) methods to a single tableau-driven implementation.


Methods Unified

  • DPRKN4
  • DPRKN5
  • DPRKN6FM
  • DPRKN8
  • DPRKN12
  • ERKN4
  • ERKN5
  • ERKN7
  • Nystrom5VelocityIndependent

All of the above methods share the same Nyström structure:
Previously, each method defined:

  • its own cache type
  • its own perform_step!

This resulted in significant duplication across implementations.

This PR unifies them under a single tableau-driven approach using shared coefficients:

  • a, b, bp, btilde, bptilde, c

Results

  • −1623 lines of code
  • All nystrom_convergence_tests pass
  • No public API changes
  • No change in numerical behavior

Notes

  • Builds on existing NystromConstantCache and prior initialization unification
  • Only velocity-independent methods are included in this refactor
  • Velocity-dependent and implicit RKN methods can be handled in future work

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

This PR continues the existing direction of unifying Nyström method infrastructure (e.g., NystromConstantCache and grouped initialization) by extending the same idea to stepping logic.

The implementation reduces duplication while keeping behavior unchanged and aligns the codebase more closely with the underlying Butcher–Nyström formulation.

Harsh Singh and others added 3 commits April 15, 2026 00:24
…romVITableau

Introduces NystromVITableau{T,T2} struct and generic NystromVICache /
NystromVIConstantCache, eliminating 9 separate per-method cache structs
and their per-method perform_step! implementations.

Methods unified: DPRKN4, DPRKN5, DPRKN6FM, DPRKN8, DPRKN12, ERKN4,
ERKN5, ERKN7, Nystrom5VelocityIndependent.

Net: -1623 lines. All nystrom_convergence_tests pass.
…Tableau (Phase 2)

Adds NystromVDTableau{T,T2} struct and generic NystromVDCache/NystromVDConstantCache,
eliminating per-method caches and perform_step! for FineRKN4, FineRKN5, RKN4,
Nystrom4, and Nystrom4VelocityIndependent.

Unchanged: DPRKN6 (kshortsize=3 dense output), IRKN3, IRKN4 (implicit).
All nystrom_convergence_tests pass (70 pass, 16 pre-existing broken).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@singhharsh1708
Copy link
Copy Markdown
Contributor Author

@ChrisRackauckas

@ChrisRackauckas
Copy link
Copy Markdown
Member

convergence tests failing

@singhharsh1708
Copy link
Copy Markdown
Contributor Author

@ChrisRackauckas checked locally now passing?

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.

2 participants