Skip to content

Commit

Permalink
Merge pull request #464 from fast-aircraft-design/openmdao-fix
Browse files Browse the repository at this point in the history
Openmdao fix
  • Loading branch information
christophe-david committed Nov 16, 2022
2 parents 95c9a85 + afbbd1e commit bd4d1df
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ python = "^3.7"
numpy = "^1.21.0"
scipy = "^1.4.1"
pandas = "^1.1.0"
openmdao = ">=3.10, <=3.21"
openmdao = "^3.10"
ipopo = "^1.0.0"
ipywidgets = "^7.7.0"
ipysheet = ">=0.5.0, <1"
Expand Down
4 changes: 3 additions & 1 deletion src/fastoad/openmdao/problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ def _read_inputs_without_setup_done(self):
# create the "shaper" IVC, but we ignore it because we need to redefine these variables
# in input file.
ivc_vars = tmp_prob.model.get_io_metadata(
"output", tags="indep_var", excludes=f"{SHAPER_SYSTEM_NAME}.*"
"output",
tags=["indep_var", "openmdao:indep_var"],
excludes=f"{SHAPER_SYSTEM_NAME}.*",
)
for meta in ivc_vars.values():
try:
Expand Down
5 changes: 4 additions & 1 deletion src/fastoad/openmdao/variables/variable_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,10 @@ def from_problem(
"output", metadata_keys=metadata_keys, excludes="_auto_ivc.*"
)
indep_outputs = problem.model.get_io_metadata(
"output", metadata_keys=metadata_keys, tags="indep_var"
"output",
metadata_keys=metadata_keys,
tags=["indep_var", "openmdao:indep_var"],
excludes="_auto_ivc.*",
)
# Move outputs from IndepVarComps into inputs
for abs_name, metadata in indep_outputs.items():
Expand Down

0 comments on commit bd4d1df

Please sign in to comment.