Skip to content

Separate setSignalIndices() out of evaluateResidual() - #630

Merged
nkoukpaizan merged 2 commits into
developfrom
nicholson/setSignalIndices
Oct 27, 2026
Merged

nkoukpaizan merged 2 commits into
developfrom
nicholson/setSignalIndices

Conversation

@nkoukpaizan

Copy link
Copy Markdown
Collaborator

Description

This separates setSignalIndices() out of evaluateResidual(). The latter now only reads the values. This is needed to enable sparsity analysis with Enzyme without calling initialize and evaluateResidual.

Proposed changes

  • Added setSignalIndices() with calls in allocate() and in the component-level tests.
  • Unrolled the signal-reading lambdas in the Ieeet1 and SexsPti residuals.

Checklist

  • All tests pass.
  • Code compiles cleanly with flags -Wall -Wpedantic -Wconversion -Wextra.
  • The new code follows GridKit™ style guidelines.
  • [N/A] There are unit tests for the new code.
  • The new code is documented.
  • The feature branch is rebased with respect to the target branch.
  • The CHANGELOG.md has been updated to reflect the changes. If this is a minor PR that is part of a larger fix already included in the file, state so.

Further comments

@nkoukpaizan nkoukpaizan self-assigned this Oct 27, 2026
@nkoukpaizan nkoukpaizan changed the title Nicholson/set signal indices Separate setSignalIndices() out of evaluateResidual() Oct 27, 2026
@nkoukpaizan
nkoukpaizan requested review from lukelowry and superwhiskers and removed request for lukelowry October 27, 2026 19:52
@nkoukpaizan
nkoukpaizan marked this pull request as ready for review October 27, 2026 19:52

@lukelowry lukelowry left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I like this, its easier to read too. thank you! Looks good

@nkoukpaizan
nkoukpaizan merged commit 3ec98b1 into develop Oct 27, 2026
7 checks passed
@nkoukpaizan
nkoukpaizan deleted the nicholson/setSignalIndices branch November 3, 2026 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants