Implement support for pygeo and OM wrapper for custom meshes#64
Open
sabakhshi wants to merge 73 commits intojoanibal:mainfrom
Open
Implement support for pygeo and OM wrapper for custom meshes#64sabakhshi wants to merge 73 commits intojoanibal:mainfrom
sabakhshi wants to merge 73 commits intojoanibal:mainfrom
Conversation
… fixed scale and translate of custom meshes not working
…ng in common block
…fortran layer indexing bugs. runtime mesh updating still needs to be implemented
joanibal
requested changes
Apr 3, 2026
Owner
joanibal
left a comment
There was a problem hiding this comment.
Nice work! Here are a few questions and suggestions
| self.set_reference_ad_seeds(ref_seeds) | ||
|
|
||
| # Since DVGeo seeds operate entirely within the python layer we set them here | ||
| if self.DVGeo is not None and dvgeo_seeds is not None: |
Owner
There was a problem hiding this comment.
This chunk appears 4 times with some variation. Could we generalize these chunks into a function?
| sens[func_key][surf_key] = geom_seeds[surf_key] | mesh_seeds[surf_key] | ||
| for key in geom_seeds: | ||
| sens[func_key][key] = geom_seeds[key] | mesh_seeds[key] | dvgeo_seeds[key] | ||
| # sens[func_key].update(geom_seeds) |
Owner
There was a problem hiding this comment.
left over comments? or was that intentional
| # prob.model.add_design_var("ovlsolver.Wing:zles") | ||
| # prob.model.add_design_var("ovlsolver.Wing:chords") | ||
| # prob.model.add_design_var("ovlsolver.Wing:mesh") # This is a really costly test | ||
| # prob.model.add_design_var("ovlsolver.Wing:aincs") # dCL/dalpha on the first element fails |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR includes support for pygeo FFD parameterization in the OVLSolver class and support for dictionary input/custom meshes in the OM wrapper.
The pygeo api is very easy to use. The user just needs to set up their FFD box and their DVGeo object with all design variables set. Then it's just a matter of setting the DVGeo instance to the OVLSolver object using the set_DVGeo function. To apply any changes made to the DVGeo design variables to the OptVL mesh the update_DVGeo function needs to be called. This will embed any mesh surfaces in the FFD if needed and then perform the pointset update. The updated point set will then be set back into OptVL and the and update surfaces routine called to update the Fortran layer. Currently, OptVL will try to embed all meshes into the same FFD so for now we suggest that FFDs only be used with cases that only have a single mesh surface. A unit test is included for the pyGeo API. A FFD box generator for VLM meshes is also included in utilities.
The OM wrapper can also now be used with meshes and input dictionaries. When a mesh is used for a particular surface all geometry inputs for that surfaces are replaced with a single mesh input. The shape of this mesh input is set by the input_mesh_shape option in the OVLGroup class. Input arrays shapes of 1,2, or 3 dimensions can be chosen with it defaulting to 1 (which is a flat array). This input shape selection allows for wide compatibility with a variety of geometry parameterization components. A unit test for the mesh features in the OM wrapper are also included.