Skip to content

AlgorithmicTangentPass::find_tensor_input accepts state-variable handles as wrt_input #118

Description

@petlenz

AlgorithmicTangentPass::find_tensor_input (pass_bodies.h ~328) scans the tensor symbol map without filtering on SymbolDecl::Category, so a wrt_input naming a tensor state variable (current/_old) — not a kinematic input — is silently accepted and differentiated against. This affects add_algorithmic_tangent for ALL callers, not just the #108 add_hyperelastic_potential helper (which now guards against it at the API level via an m_inputs_cache check — see PR #117).

Fix: filter find_tensor_input to Category::Input, and reject a state-variable wrt_input loudly.

Surfaced by the #117 second-pass review.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions