Skip to content

Add copyAlgoToState/copyStateToAlgo bulk helpers and convert 16 modules (#718)#2554

Open
dcwhite wants to merge 2 commits into
masterfrom
feature/718-bulk-state-copy-helpers
Open

Add copyAlgoToState/copyStateToAlgo bulk helpers and convert 16 modules (#718)#2554
dcwhite wants to merge 2 commits into
masterfrom
feature/718-bulk-state-copy-helpers

Conversation

@dcwhite

@dcwhite dcwhite commented Jul 4, 2026

Copy link
Copy Markdown
Member

Summary

Test plan

  • Build with BUILD_TESTING=ON and confirm all converted modules pass unit tests
  • Spot-check a few converted modules in the GUI to confirm state round-trips correctly

🤖 Generated with Claude Code

dcwhite and others added 2 commits July 3, 2026 23:14
Reduces N per-type setStateXFromAlgo/setAlgoXFromState calls to a
single initializer-list call. Uses direct Variable::Value variant copy
so no type annotation needed. Demonstrates with ModelTMSCoil refactor.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces per-type helper call sequences with the new bulk helpers across
BrainStimulator, Fields, Inverse, Math, and Visualization modules.
Net -133 lines. Option parameters kept as individual calls where needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dcwhite dcwhite requested a review from jessdtate July 4, 2026 05:34
@dcwhite dcwhite self-assigned this Jul 4, 2026
@dcwhite dcwhite added the Modules label Jul 4, 2026
@dcwhite dcwhite added this to the 5.0.0 milestone Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add helper methods to make copying state easier from/to algo/GUI layers

1 participant