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 ability for writeSurfaceTecplot to get surface from DVGeo #209

Merged
merged 7 commits into from
Jul 14, 2023

Conversation

A-CGray
Copy link
Member

@A-CGray A-CGray commented Jul 13, 2023

Purpose

The writeSurfaceSTL in DVConstraints has the ability to write out a surface that is not stored in a DVConstraints object but in the associated DVGeo. This PR just extends that functionality to the writeSurfaceTecplot function.

Expected time until merged

1 day

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

@A-CGray A-CGray requested a review from a team as a code owner July 13, 2023 21:34
@A-CGray A-CGray requested review from anilyil and sseraj July 13, 2023 21:34
@A-CGray A-CGray changed the title Add ability for writeSurfaceTecplot to get surface from DVGeo Add ability for writeSurfaceTecplot to get surface from DVGeo Jul 13, 2023
@codecov
Copy link

codecov bot commented Jul 13, 2023

Codecov Report

Merging #209 (0b39596) into main (d4784ad) will increase coverage by 0.00%.
The diff coverage is 53.84%.

❗ Current head 0b39596 differs from pull request most recent head 0730b2b. Consider uploading reports for the commit 0730b2b to get more accurate results

@@           Coverage Diff           @@
##             main     #209   +/-   ##
=======================================
  Coverage   64.76%   64.76%           
=======================================
  Files          47       47           
  Lines       12018    12018           
=======================================
+ Hits         7783     7784    +1     
+ Misses       4235     4234    -1     
Impacted Files Coverage Δ
pygeo/constraints/DVCon.py 71.87% <53.84%> (+0.14%) ⬆️

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

Copy link
Contributor

@sseraj sseraj left a comment

Choose a reason for hiding this comment

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

The name _getSurfacePoints is too similar to _getSurfaceVertices. Can you modify _getSurfaceVertices to add the fromDVGeo argument instead of adding a new function?

sseraj
sseraj previously approved these changes Jul 14, 2023
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.

Changes look good. One minor thing: can you add what the default behavior is when fromDVGeo is set to None? Does it just write the original coordinates? To someone looking at the current state of the code w/o any of its history, it would be difficult to understand the different behavior.

@anilyil anilyil merged commit dc41b1f into main Jul 14, 2023
5 of 10 checks passed
@anilyil anilyil deleted the writeSurfaceTecplot branch July 14, 2023 19:58
@A-CGray
Copy link
Member Author

A-CGray commented Jul 14, 2023

Changes look good. One minor thing: can you add what the default behavior is when fromDVGeo is set to None? Does it just write the original coordinates? To someone looking at the current state of the code w/o any of its history, it would be difficult to understand the different behavior.

Sure, please check that my explanation makes sense to you. As far as I can see, if fromDVGeo=None then the points are taken from the DVCon's self.surfaces dict, which only ever contains the original surface coordinates. Whereas, if you supply a DVGeo name, it will retreive the current deformed coordinates from DVGeo

@anilyil
Copy link
Contributor

anilyil commented Jul 14, 2023

Yeah set surface just gets an initial copy of the vertices, which is what is saved in DVCon. The explanation is correct.

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