pygeo icon indicating copy to clipboard operation
pygeo copied to clipboard

Changed projectNode to work with overset surface triangulations

Open bmlowe4 opened this issue 2 years ago • 7 comments

Purpose

A few lines of code were added to account for the direction of the projection in projectNode (projection.py) when nsol>2. The use of overset surface meshes can lead to more than 2 resulting projections. This addesses the issue of which projected point to choose.

Expected time until merged

A few weeks

Type of change

  • [x] 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

Create a volume and/or thickness constraint with a surface triangulation composed of overlapping meshes.

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

bmlowe4 avatar Feb 24 '23 19:02 bmlowe4

Codecov Report

Attention: Patch coverage is 11.11111% with 96 lines in your changes missing coverage. Please review.

Project coverage is 64.89%. Comparing base (3404b51) to head (5a48cb7). Report is 1 commits behind head on main.

Files Patch % Lines
pygeo/constraints/thicknessConstraint.py 8.92% 51 Missing :warning:
pygeo/constraints/DVCon.py 2.50% 39 Missing :warning:
pygeo/geo_utils/projection.py 0.00% 4 Missing :warning:
pygeo/parameterization/DVGeoMulti.py 75.00% 2 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #186      +/-   ##
==========================================
- Coverage   65.47%   64.89%   -0.59%     
==========================================
  Files          47       47              
  Lines       12265    12387     +122     
==========================================
+ Hits         8030     8038       +8     
- Misses       4235     4349     +114     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Feb 24 '23 19:02 codecov[bot]

Hi @bmlowe4, I did not fully understand how the overset mesh is resulting in 3 ray-intersections. If you are using a zipper mesh to remove overlapping compute cells, and if the zipper mesh is done well so that it does not fold on itself, I would have expected only 2 intersections. So this leads me to think that the overset mesh you have either does not remove overlapping cells or there are issues with the zipper. Any chance you can explain your application further so I can understand it better?

anilyil avatar Mar 10 '23 17:03 anilyil

Hey, sorry, this got put on the back burner behind some other projects.

@anilyil the CFD code we are using does not use a zipper mesh, hence our resulting surface triangulation has overlapping meshes. It is simpler to fix the node projection in DVConstraint than it is to remove the overlap in the surface triangulation. This makes the node projection algorithm more general unless you expect the two surfaces onto which you want to project to be both below or above the original plane. I don't think this will be the case based on the requirements that leList and teList be inside the wing/geometry.

@sseraj I will work on a test for this. Apologies for the delay

bmlowe4 avatar Mar 10 '23 18:03 bmlowe4

Okay, understood. Then, I am fine with the PR after @sseraj's comments are addressed. Thanks for the explanation.

anilyil avatar Mar 10 '23 18:03 anilyil

Any updates on this @bmlowe4?

sseraj avatar May 15 '23 19:05 sseraj

Hi @bmlowe4, I wanted to check on this PR again. Any updates?

sseraj avatar Jun 21 '23 19:06 sseraj

I think we should close this PR. The incoming branch now has multiple disjoint developments.

sseraj avatar Aug 03 '24 21:08 sseraj

Closed. Will continue development independently.

bmlowe4 avatar Aug 07 '24 22:08 bmlowe4