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

Pass the DVname of VSP design variable to vspDV class #156

Merged
merged 9 commits into from
Sep 13, 2022

Conversation

ArshSaja
Copy link
Contributor

@ArshSaja ArshSaja commented Sep 7, 2022

Purpose

The DVname in vspDV class was set to None. Thus, when dv.name is called, it returns None. This PR fixes this issue.

Expected time until merged

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

Checklist

  • I have run flake8 and black to make sure the Python code adheres to PEP-8 and is consistently formatted
  • I have formatted the Fortran code with fprettify or C/C++ code with clang-format as applicable
  • 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

@ArshSaja ArshSaja requested a review from a team as a code owner September 7, 2022 16:30
@codecov
Copy link

codecov bot commented Sep 7, 2022

Codecov Report

Merging #156 (fe9ed38) into main (c5cda6d) will decrease coverage by 10.81%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##             main     #156       +/-   ##
===========================================
- Coverage   63.90%   53.08%   -10.82%     
===========================================
  Files          47       47               
  Lines       11757    11757               
===========================================
- Hits         7513     6241     -1272     
- Misses       4244     5516     +1272     
Impacted Files Coverage Δ
pygeo/parameterization/DVGeoVSP.py 81.43% <100.00%> (ø)
pygeo/parameterization/designVars.py 77.65% <100.00%> (ø)
pygeo/parameterization/DVGeoMulti.py 0.39% <0.00%> (-89.38%) ⬇️
pygeo/constraints/areaConstraint.py 50.50% <0.00%> (-25.42%) ⬇️
pygeo/constraints/DVCon.py 68.04% <0.00%> (-3.69%) ⬇️
pygeo/pyBlock.py 45.37% <0.00%> (-1.65%) ⬇️
pygeo/parameterization/DVGeo.py 64.23% <0.00%> (-1.44%) ⬇️
pygeo/topology.py 54.92% <0.00%> (-0.23%) ⬇️
pygeo/__init__.py 91.30% <0.00%> (+8.69%) ⬆️
pygeo/parameterization/__init__.py 88.88% <0.00%> (+11.11%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@joanibal
Copy link
Collaborator

joanibal commented Sep 7, 2022

Can you provide more context here. Was the code broken before? What is wrong with using dv.name?

@ArshSaja
Copy link
Contributor Author

ArshSaja commented Sep 8, 2022

For openvsp, since we don't pass the DV name in vspDV class, we set the name of DV as None. Since all of our VSP related work is done mphys, we haven't noticed that issue in MACH. The key is the DV name for both vsp and esp. So, it won't affect anything.

@hajdik
Copy link
Contributor

hajdik commented Sep 8, 2022

For openvsp, since we don't pass the DV name in vspDV class, we set the name of DV as None.

Is there a reason we couldn't add names to VSP DVs to keep a more consistent API across the different DVGeo types and DV types? The name is already present in as the key in self.DVs, right?

@ArshSaja
Copy link
Contributor Author

ArshSaja commented Sep 9, 2022

I changed it to the default case. Now the DV name is passed to the vspDV class.

@eirikurj
Copy link
Contributor

@ArshSaja can you update the PR name and purpose to be consistent with the content

@ArshSaja ArshSaja changed the title Fixed the Dv name in addVarGroup Pass the DVname of VSP design variable to vspDV class Sep 12, 2022
@ArshSaja
Copy link
Contributor Author

I updated the PR details. @eirikurj

@marcomangano marcomangano merged commit 5898192 into mdolab:main Sep 13, 2022
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.

5 participants