Skip to content

Evaluate paired spacecraft forces and torques once per RHS - #72

Merged
SuperdoerTrav merged 7 commits into
mainfrom
fix/sixdof-force-reuse
Oct 28, 2026
Merged

SuperdoerTrav merged 7 commits into
mainfrom
fix/sixdof-force-reuse

Conversation

@SuperdoerTrav

Copy link
Copy Markdown
Collaborator

Summary

Use a combined per-RHS evaluation for eligible built-in force/torque models and toolkit-created sums, without a mutable state cache. Preserve independent callbacks when bindings, depletion policies, public methods, or subclass overrides differ. Opaque user models are not inferred to be linear sums from private attributes.

Validation

Standalone numerical suite: 739 passed, 5 optional skips. Final direct/aggregate opaque-model, binding/suppression, class/instance/MRO override checks pass; 58 propagation/variational tests passed on the final correction. Policy, release metadata, syntax Ruff and whitespace checks pass. The full publishing/browser run is in progress.

The continuation will freshly validate both full suites and docs against current main, then wait for every CI check. Broader variational/extended finite-difference redesign is deliberately outside this patch because it requires explicit callback-derivative contracts.

Pair force and torque evaluations only when spacecraft binding identity and depletion-suppression policy match. This preserves independent callback results for differently bound acceleration and torque channels while retaining aggregate per-RHS reuse.\n\nVerified with PYTHONPATH=/home/yeager7/.cache/claude/ssatk-wt/sixdof-force-reuse MPLBACKEND=Agg /home/yeager7/envs/env_python3/bin/python -m pytest tests/test_propagators_6dof.py tests/test_6dof_variational.py -q: 58 passed in 15.54s, plus an independent callback check producing acceleration area=2 and torque area=3 with pairing disabled.
Restrict the combined force/torque fast path to the five built-in models with unchanged public delegators. Subclasses or instances overriding acceleration, torque, or the private combined method now use the public callbacks independently; aggregate children apply the same guard.\n\nVerified bounded direct and aggregate subclass reproductions: public acceleration/torque outputs were preserved and the fast path was bypassed. Inherited subclasses remained eligible; instance and class overrides were rejected.\n\nValidation: PYTHONPATH=/home/yeager7/.cache/claude/ssatk-wt/sixdof-force-reuse MPLBACKEND=Agg /home/yeager7/envs/env_python3/bin/python -m pytest tests/test_propagators_6dof.py tests/test_6dof_variational.py -q: 58 passed in 24.90s.
Reject combined force/torque pairing when any resolved __call__, acceleration, torque, or private combined method differs from the marker owner. This catches overrides introduced by intermediate base classes and direct __call__-only subclasses; aggregate children use the same eligibility predicate.\n\nVerified two-level FacetDrag subclasses through both direct and models=[...] propagation: torque override reached omega_y=4.56 and __call__ override reached v_x=1.23. Inherited non-overriding subclasses remained eligible.\n\nValidation: PYTHONPATH=/home/yeager7/.cache/claude/ssatk-wt/sixdof-force-reuse MPLBACKEND=Agg /home/yeager7/envs/env_python3/bin/python -m compileall -q ssatk/accelerations_6dof ssatk/propagators_6dof; targeted propagation/variational suite: 58 passed in 3.45s.
Do not infer toolkit aggregate closures from an arbitrary _models attribute. Mark only _sum_model_accelerations and _sum_model_torques outputs, leaving opaque user composites on their public acceleration and torque callbacks.\n\nVerified an opaque model with _models=(child,), public acceleration=2*ones and torque=3*ones through both direct and models=[...] propagation: v=[0.02,0.02,0.02] and omega=[0.03,0.03,0.03] in both paths.\n\nValidation: PYTHONPATH=/home/yeager7/.cache/claude/ssatk-wt/sixdof-force-reuse MPLBACKEND=Agg /home/yeager7/envs/env_python3/bin/python -m compileall -q ssatk/propagators_6dof; targeted propagation/variational suite: 58 passed in 6.59s.
@SuperdoerTrav
SuperdoerTrav merged commit 47c135c into main Oct 28, 2026
16 checks passed
@SuperdoerTrav
SuperdoerTrav deleted the fix/sixdof-force-reuse branch October 28, 2026 03:45
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