Skip to content

Tangent linear model of an assignment into the output space - #5784

Open
sghelichkhani wants to merge 1 commit into
releasefrom
sghelichkhani/assign-adjfloat-tlm
Open

sghelichkhani wants to merge 1 commit into
releasefrom
sghelichkhani/assign-adjfloat-tlm

Conversation

@sghelichkhani

Copy link
Copy Markdown
Contributor

Function.assign is linear, so its tangent linear model is the same assignment applied to the input tangent. FunctionAssignBlock returned the input tangent itself, an AdjFloat for an AdjFloat control, so the TLM and the Hessian failed in the next block. The block now assigns the input tangent to a new Function in the output space.

This is separate from #5780, which changes the adjoint of the same block. The two do not conflict, and with both the Hessian of an assignment from an AdjFloat is also correct on 2 ranks.

Fixes #5782

AI-assisted with Claude Code.

The tangent linear model of Function.assign without an expression returned
the input tangent itself. For an AdjFloat input this is an AdjFloat, so the
TLM and the Hessian failed in the next block. Assignment is linear, so assign
the input tangent to a new Function in the output space.
@sghelichkhani sghelichkhani added the LLM used An LLM was used in the production of this PR label Dec 6, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

LLM used An LLM was used in the production of this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant