From 9e7bf7c8a61c7ec0b13afda609db0984bfb0d260 Mon Sep 17 00:00:00 2001 From: Hannah Hajdik Date: Wed, 17 May 2023 09:41:32 -0400 Subject: [PATCH] return of the refaxis --- pygeo/mphys/mphys_dvgeo.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pygeo/mphys/mphys_dvgeo.py b/pygeo/mphys/mphys_dvgeo.py index 9759c503..38681674 100644 --- a/pygeo/mphys/mphys_dvgeo.py +++ b/pygeo/mphys/mphys_dvgeo.py @@ -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 """