Skip to content

On hold — discussion with @EveCharbie required — Reduce unused RK state symbols#1071

Draft
mickaelbegon wants to merge 1 commit into
pyomeca:masterfrom
mickaelbegon:codex/optimize-966-one-per-node-cx
Draft

On hold — discussion with @EveCharbie required — Reduce unused RK state symbols#1071
mickaelbegon wants to merge 1 commit into
pyomeca:masterfrom
mickaelbegon:codex/optimize-966-one-per-node-cx

Conversation

@mickaelbegon

@mickaelbegon mickaelbegon commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • expose whether an ODE solver consumes only the starting state/algebraic-state CX
  • omit the unused middle CX for explicit RK solvers with PhaseDynamics.ONE_PER_NODE
  • keep shared dynamics, collocation, trapezoidal integration, and controls unchanged
  • add a regression test covering the reduced state layout and unchanged control layout

This is a focused first performance improvement toward #966. For explicit RK phases using one dynamics function per node, state-like symbolic columns are reduced from three to two at every node while preserving independent start/end inputs required by continuity.

Tests

  • pytest tests/shard2/test_global_getting_started.py::test_rk_one_per_node_does_not_declare_unused_state_cx -q
  • pytest tests/shard2/test_global_getting_started.py::test_pendulum[...] -q (RK4, SX, one thread, ONE_PER_NODE, IPOPT; existing numerical regression)

This change is Reviewable

@mickaelbegon mickaelbegon changed the title Reduce unused RK state symbols with one dynamics per node On hold — discussion with @EveCharbie required — Reduce unused RK state symbols Jul 22, 2026
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.

1 participant