Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Triangulated surface constraint using geograd and multiple DVGeos per DVCon #52

Merged
merged 33 commits into from
Feb 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
09bf6af
added hack to make child ffds work as intended
bbrelje Mar 13, 2019
f581f68
Started working on triangulatedsurfaceconstraint class
bbrelje Mar 13, 2019
3ddf659
Finished class and add method for general triangulated geometry const…
bbrelje Mar 13, 2019
e6ab973
Working opt run of trisurf constraint
bbrelje Mar 13, 2019
c5167e6
Added two-constraint formulation
bbrelje Mar 13, 2019
bac6672
DIE constraint metric, tol update, todos
bbrelje Mar 13, 2019
8440f98
Updated trisurf constraint with latest geograd
bbrelje Mar 13, 2019
68e6f51
Add function to write triangulated CFD mesh surface to an .stl file
bbrelje Mar 13, 2019
3d7af59
Correct indexing in the stlwriter function
bbrelje Mar 15, 2019
e89c670
Couple of typo fixes; add unique dv names to dvgeo
bbrelje Mar 18, 2019
b10490d
Add a gitignore
bbrelje Mar 18, 2019
16b44da
dvconstraints two-way trisurf verified
bbrelje Mar 26, 2019
de3519e
"add option to disable GPU computation manually
bbrelje Mar 28, 2019
c9cf269
Triangulated volume constraint class
bbrelje Apr 17, 2019
9df7f27
numpy datatype collision for mpi geograd
bbrelje Apr 17, 2019
2e04732
Latest on stampede from aviation paper
Jan 11, 2020
3ee6d47
Merge remote-tracking branch 'upstream/master' into trisurf_constraint
bbrelje Oct 22, 2020
c516ae4
Update LEradius with new multiple dvgeo format
bbrelje Oct 22, 2020
011b1b0
Merge remote-tracking branch 'upstream/master' into trisurf_merge
bbrelje Oct 28, 2020
6dd2caa
Add refactored triangulated surface constraint and tests
bbrelje Oct 30, 2020
098163c
roll back pyblock changes
bbrelje Oct 30, 2020
0a5a07b
roll back block fix
bbrelje Oct 30, 2020
a4402f6
roll back geodvsectionlocal docstring delta
bbrelje Oct 30, 2020
fc5f799
test dvgeo naming
bbrelje Oct 30, 2020
222327d
Add ability to specify triangle skip tol
bbrelje Oct 30, 2020
9fbed38
update reg test values
bbrelje Oct 30, 2020
fd282ba
Test 15 missing some values
bbrelje Oct 30, 2020
a726a52
code review updates
bbrelje Nov 12, 2020
48d05d0
Updated geograd call with choice of mpi comm
bbrelje Nov 14, 2020
c463430
Merge branch 'master' into trisurf_merge
bbrelje Jan 23, 2021
8b77fb7
Reimplement triangulated volume constraint
bbrelje Jan 31, 2021
bd6e402
Merge branch 'master' into trisurf_merge
bbrelje Jan 31, 2021
76b25e6
Merge branch 'master' into trisurf_merge
anilyil Feb 2, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
971 changes: 861 additions & 110 deletions pygeo/DVConstraints.py

Large diffs are not rendered by default.

17 changes: 15 additions & 2 deletions pygeo/DVGeometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class DVGeometry(object):
>>> DVGeo.addGeoDVLocal('shape', lower=-0.5, upper=0.5, axis='y')
>>>
"""
def __init__(self, fileName, complex=False, child=False, faceFreeze=None, *args, **kwargs):
def __init__(self, fileName, complex=False, child=False, faceFreeze=None, name=None, *args, **kwargs):

self.DV_listGlobal = OrderedDict() # Global Design Variable List
self.DV_listLocal = OrderedDict() # Local Design Variable List
Expand All @@ -105,6 +105,9 @@ def __init__(self, fileName, complex=False, child=False, faceFreeze=None, *args,
# Coefficient rotation matrix dict for Section Local variables
self.coefRotM = {}

# Name (used for ensuring design variables names are unique to pyoptsparse)
self.name = name

# Flags to determine if this DVGeometry is a parent or child
self.isChild = child
self.children = []
Expand Down Expand Up @@ -590,6 +593,10 @@ def addGeoDVGlobal(self, dvName, value, func, lower=None, upper=None,
configurations. The default value of None implies that the design
variable appies to *ALL* configurations.
"""
# if the parent DVGeometry object has a name attribute, prepend it
if self.name is not None:
dvName = self.name + '_' + dvName
anilyil marked this conversation as resolved.
Show resolved Hide resolved

if type(config) == str:
config = [config]
self.DV_listGlobal[dvName] = geoDVGlobal(
Expand Down Expand Up @@ -658,6 +665,9 @@ def addGeoDVLocal(self, dvName, lower=None, upper=None, scale=1.0,
>>> PS = geo_utils.PointSelect(type = 'y', pt1=[0,0,0], pt2=[10, 0, 10])
>>> nVar = DVGeo.addGeoDVLocal('shape_vars', lower=-1.0, upper=1.0, pointSelect=PS)
"""
if self.name is not None:
dvName = self.name + '_' + dvName

if type(config) == str:
config = [config]

Expand Down Expand Up @@ -824,6 +834,9 @@ class in geo_utils. Using pointSelect discards everything in volList.
>>> # moving in the 1 direction, within +/- 1.0 units
>>> DVGeo.addGeoDVSectionLocal('shape_vars', secIndex='k', lower=-1, upper=1, axis=1)
"""
if self.name is not None:
dvName = self.name + '_' + dvName

if type(config) == str:
config = [config]

Expand Down Expand Up @@ -3532,7 +3545,7 @@ def sectionFrame(self, sectionIndex, sectionTransform, sectionLink, ivol=0,
ax2 /= numpy.linalg.norm(ax2)
else:
raise Error('orient2 must be \'svd\' or \'ffd\'')

# Options for choosing in-plane axes
# 1. Align axis '0' with projection of the given vector on section
# plane.
Expand Down
Loading