diff --git a/baseclasses/solvers/pyAero_solver.py b/baseclasses/solvers/pyAero_solver.py index 58434ed..27c3ae6 100644 --- a/baseclasses/solvers/pyAero_solver.py +++ b/baseclasses/solvers/pyAero_solver.py @@ -54,8 +54,9 @@ def __init__( self.families = CaseInsensitiveDict() self._updateGeomInfo = False - # Initialize kwargs for addPointSet + # Initialize kwargs for addPointSet and customPointSetFamilies self.pointSetKwargs = None + self.customPointSetFamilies = None def setMesh(self, mesh): """ @@ -79,7 +80,7 @@ def setMesh(self, mesh): pts = self.getSurfaceCoordinates(self.meshFamilyGroup) self.mesh.setSurfaceDefinition(pts, conn, faceSizes) - def setDVGeo(self, DVGeo, pointSetKwargs=None): + def setDVGeo(self, DVGeo, pointSetKwargs=None, customPointSetFamilies=None): """ Set the DVGeometry object that will manipulate 'geometry' in this object. Note that does not **strictly** need a @@ -94,6 +95,20 @@ def setDVGeo(self, DVGeo, pointSetKwargs=None): pointSetKwargs : dict Keyword arguments to be passed to the DVGeo addPointSet call. Useful for DVGeometryMulti, specifying FFD projection tolerances, etc. + These arguments are used for all point sets added by this solver. + + customPointSetFamilies : dict of dicts + This argument is used to split up the surface points added to the DVGeo by the solver into potentially + multiple subsets. The keys of the dictionary will be used to determine what families should be + added to the dvgeo object as separate point sets. The values of each key is another dictionary, which can be empty. + If desired, the inner dictionaries can contain custom kwargs for the addPointSet call for each surface family, + specified by the keys of the top level dictionary. + The surface families need to be all part of the designSurfaceFamily. + Useful for DVGeometryMulti, specifying FFD projection tolerances, etc. + If this is provided together with pointSetKwargs, the regular pointSetKwargs + will be appended to each component's dictionary. If the same argument + is also provided in pointSetKwargs, the value specified in customPointSetFamilies + will be used. Examples -------- @@ -103,11 +118,15 @@ def setDVGeo(self, DVGeo, pointSetKwargs=None): self.DVGeo = DVGeo + # save the common kwargs dict. default is empty if pointSetKwargs is None: self.pointSetKwargs = {} else: self.pointSetKwargs = pointSetKwargs + # save if we have customPointSetFamilies. this default is not mutable so we can just set it as is. + self.customPointSetFamilies = customPointSetFamilies + def getTriangulatedMeshSurface(self, groupName=None, **kwargs): """ This function returns a trianguled verision of the surface