Skip to content

Commit

Permalink
return of the refaxis
Browse files Browse the repository at this point in the history
  • Loading branch information
hajdik committed May 17, 2023
1 parent 190ba6e commit 9e7bf7c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pygeo/mphys/mphys_dvgeo.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,17 @@ def nom_addESPVariable(self, desmptr_name, isComposite=False, **kwargs):
if not isComposite:
self.add_input(desmptr_name, distributed=False, shape=val.shape, val=val)

def nom_addRefAxis(self, childIdx=None, **kwargs):
# references axes are only needed in FFD-based DVGeo objects
if self.geo_type != "ffd":
raise RuntimeError(f"Only FFD-based DVGeo objects can use reference axes, not type:{self.geo_type}")

# we just pass this through
if childIdx is None:
return self.DVGeo.addRefAxis(**kwargs)
else:
return self.DVGeo.children[childIdx].addRefAxis(**kwargs)

"""
Wrapper for DVCon functions
"""
Expand Down

0 comments on commit 9e7bf7c

Please sign in to comment.