Skip to content

Prevent "shape_by_conn" hierarchy variables from being set to a stale default value.#1088

Open
Kenneth-T-Moore wants to merge 5 commits intoOpenMDAO:mainfrom
Kenneth-T-Moore:shape_by_conn
Open

Prevent "shape_by_conn" hierarchy variables from being set to a stale default value.#1088
Kenneth-T-Moore wants to merge 5 commits intoOpenMDAO:mainfrom
Kenneth-T-Moore:shape_by_conn

Conversation

@Kenneth-T-Moore
Copy link
Copy Markdown
Member

Summary

This fixes a bug found by Irian when using an post-mission external subsystem with a custom hierarchy variable "cg" as an input. The length of the cg vector is not known until all dymos phases are instantiated, so the variable was declared with "shape_by_conn" set to True so that the shape could be computed dynamically. The Aviary bug occurs because aviary_group sets default initial values and units for all hierarchy variables in the model, which derails the dynamic shape determination by setting a bogus shape.

This fix finds all shape_by_conn hiearchy variables and excludes them from setting a value.

Related Issues

  • Resolves #

Backwards incompatibilities

None

New Dependencies

None

@jkirk5 jkirk5 added this pull request to the merge queue Apr 17, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 17, 2026
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.

2 participants