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

Add composite DVs #119

Merged
merged 12 commits into from
Mar 13, 2022
Merged

Add composite DVs #119

merged 12 commits into from
Mar 13, 2022

Conversation

ewu63
Copy link
Collaborator

@ewu63 ewu63 commented Mar 11, 2022

Purpose

This PR adds composite DVs, which are linear combinations of existing DVs.

Expected time until merged

Somewhat urgent, by end of the week please.

Type of change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (non-backwards-compatible fix or feature)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Documentation update
  • Maintenance update
  • Other (please describe)

Testing

Tests will come at a later time.

Checklist

  • I have run flake8 and black to make sure the code adheres to PEP-8 and is consistently formatted
  • I have run unit and regression tests which pass locally with my changes
  • I have added new tests that prove my fix is effective or that my feature works
  • I have added necessary documentation

@codecov
Copy link

codecov bot commented Mar 11, 2022

Codecov Report

Merging #119 (6c42248) into master (80cf705) will decrease coverage by 0.46%.
The diff coverage is 26.19%.

@@            Coverage Diff             @@
##           master     #119      +/-   ##
==========================================
- Coverage   63.86%   63.40%   -0.47%     
==========================================
  Files          41       41              
  Lines       10931    11033     +102     
==========================================
+ Hits         6981     6995      +14     
- Misses       3950     4038      +88     
Impacted Files Coverage Δ
pygeo/constraints/areaConstraint.py 75.91% <0.00%> (ø)
pygeo/geo_utils/misc.py 30.76% <0.00%> (ø)
pygeo/constraints/baseConstraint.py 57.45% <10.00%> (-5.51%) ⬇️
pygeo/parameterization/designVars.py 74.87% <20.00%> (-2.97%) ⬇️
pygeo/parameterization/DVGeo.py 64.29% <28.40%> (-1.85%) ⬇️
pygeo/__init__.py 89.47% <100.00%> (ø)
pygeo/constraints/thicknessConstraint.py 82.50% <100.00%> (ø)
pygeo/geo_utils/norm.py 61.22% <100.00%> (-1.16%) ⬇️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

Copy link
Contributor

@marcomangano marcomangano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice stuff, most of my comments are to get a better understanding about what is going on.
Two comments:

  • Shall we rename convertSensitivitytoDict and the reverse one? it seems it's of more general use than for just sensitivities
  • I assume this is done by the new map functions at the end of DVGeo.py, but how are the DVs mapped back to the user at the end?

pygeo/parameterization/DVGeo.py Show resolved Hide resolved
pygeo/parameterization/DVGeo.py Outdated Show resolved Hide resolved
pygeo/parameterization/DVGeo.py Show resolved Hide resolved
pygeo/parameterization/DVGeo.py Show resolved Hide resolved
pygeo/parameterization/DVGeo.py Show resolved Hide resolved
pygeo/parameterization/DVGeo.py Show resolved Hide resolved
@mdolab mdolab deleted a comment from marcomangano Mar 12, 2022
@mdolab mdolab deleted a comment from marcomangano Mar 12, 2022
@mdolab mdolab deleted a comment from marcomangano Mar 12, 2022
@ewu63 ewu63 marked this pull request as ready for review March 12, 2022 23:59
@ewu63 ewu63 requested a review from a team as a code owner March 12, 2022 23:59
Copy link
Contributor

@anilyil anilyil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff. I have few minor comments, but good to go otherwise

pygeo/parameterization/DVGeo.py Show resolved Hide resolved
@@ -1237,6 +1239,30 @@ class in geo_utils. Using pointSelect discards everything in volList.

return self.DV_listSectionLocal[dvName].nVal

def addGeoDVComposite(self, dvName, ptSetName=None, u=None, scale=None):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add some comments or dosctrings briefly explaining that this is more of a preprocessing routine thats run on a single proc.

@anilyil anilyil merged commit 740a4c0 into master Mar 13, 2022
@anilyil anilyil deleted the composite-dvs-merge branch March 13, 2022 22:51
@eirikurj eirikurj mentioned this pull request Mar 15, 2022
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants