-
Notifications
You must be signed in to change notification settings - Fork 55
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
DVGeoMulti anisotropy and loop efficiency #167
Conversation
Codecov Report
@@ Coverage Diff @@
## main #167 +/- ##
==========================================
+ Coverage 63.92% 64.05% +0.12%
==========================================
Files 47 47
Lines 11818 11814 -4
==========================================
+ Hits 7555 7567 +12
+ Misses 4263 4247 -16
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@sseraj just to follow up from the "testing" section discussion during maintenance. Do you plan to add any tests for the new option? |
I can add a non-default anisotropy to the existing test and retrain. I could also parameterize the test so that is runs both with default and non-default values, but if the test passes with non-default values, that should also cover the default behavior ( |
@hajdik I added some figures and a more detailed explanation on why I needed the anisotropy option in the PR description |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I appreciate the figures
Purpose
I added an "anisotropic" deformation option in DVGeoMulti. This is something I needed because my initial intersection curve was skewed. I do not expect this feature to be necessary for most cases.
While adding this feature, I also fixed some inefficiencies in the curve-based deformation loops. For
update
, I moved some computations out of the loop over points. Forsens
, I did the same thing and also switched the order of the loops to avoid unnecessary computations.Lastly, I removed the outdated and unused
update_d
function.Details on why I needed the anisotropy option
The figure below shows the wing-fuselage collar for my configuration. The initial wing-fuselage intersection curve is shown in orange and the intersection curve after design changes is shown in blue.
The initial intersection curve is "skewed" in that the trailing edge part of the intersection is very flat. This can be a problem because the inverse-distance warping used in DVGeoMulti is a point-based approach that does not account for surface connectivity. In my case, this was causing points on the lower surface near the trailing edge intersection to follow the trailing edge instead of the lower surface:
Using
anisotropy=[0.3, 0.8, 1.0]
increases the influence of parts of the curve on the same x-y plane as the points being warped. This fixes the issue and results in better mesh quality near the trailing edge:Expected time until merged
1 week
Type of change
Testing
I updated the DVGeoMulti test to use the anisotropy option. The original test passed with the default behavior (no anisotropy), which shows that the refactoring did not change the updated points. The new test proves that the derivatives work with the anisotropy change.
Checklist
flake8
andblack
to make sure the Python code adheres to PEP-8 and is consistently formattedfprettify
or C/C++ code withclang-format
as applicable