Skip to content

Commit

Permalink
Adding option to prevent OpenMDAO from suppressing tecplot file writi…
Browse files Browse the repository at this point in the history
…ng (#427)

* Adding option to prevent OpenMDAO from suppressing tecplot file writing when using `group_by_pre_opt_post` feature

* black reformat

* version upperbound for next mphys major release

* Bump patch version

---------

Co-authored-by: Eytan Adler <63426601+eytanadler@users.noreply.github.com>
  • Loading branch information
timryanb and eytanadler authored Apr 29, 2024
1 parent 5c28f3e commit d788e11
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions openaerostruct/mphys/lift_distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ def setup(self):
nx, ny, _ = mesh.shape
self.add_input(name + "_def_mesh", val=mesh, units="m", tags=["mphys_coupling"])
self.add_input(name + "_sec_forces", val=np.ones((nx - 1, ny - 1, 3)), units="N", tags=["mphys_coupling"])
# Prevents OpenMDAO from suppressing this component when using group_by_pre_opt_post feature
self.options["always_opt"] = True

def compute(self, inputs, outputs):
"""
Expand Down
2 changes: 2 additions & 0 deletions openaerostruct/mphys/surface_contours.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ def setup(self):
self.add_input(name + "_sec_forces", val=np.ones([nx - 1, ny - 1, 3]), units="N", tags=["mphys_coupling"])
self.add_input("circulations", val=np.zeros([tot_panels]), units="m**2/s", tags=["mphys_coupling"])
self.solution_counter = 0
# Prevents OpenMDAO from suppressing this component when using group_by_pre_opt_post feature
self.options["always_opt"] = True

def compute(self, inputs, outputs):
"""
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"docs": ["sphinx_mdolab_theme"],
"test": ["testflo"],
"ffd": ["pygeo>=1.6.0"],
"mphys": ["mphys>=1.0.0"],
"mphys": ["mphys>=1.0.0,<2.0.0"],
}

# Add an optional dependency that concatenates all others
Expand Down

0 comments on commit d788e11

Please sign in to comment.