-
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
Added coordinate transformations and a few fixes #157
Conversation
I know this is an early draft, but I am confused about what goes into |
@marcomangano, you are correct that this is a draft, but I just added the explanation for that functionality: https://github.com/mdolab/pygeo/pull/157/files#diff-6f6a800de0054468f520f9d63ccbf34c246bc5cc490311587b7068ec8c27fb85R650-R708 Let me know if it's clear or not. I will also try to add a test for this. |
I am also thinking of adding the testing required for mdolab/pyspline#47 in here. Is that okay? It looked like pyspline itself does not have many tests, plus, I would rather test the full embedding with DVGeo in the loop since thats how people interact with those routine 99% of the time. |
Codecov Report
@@ Coverage Diff @@
## main #157 +/- ##
===========================================
- Coverage 63.75% 53.22% -10.53%
===========================================
Files 47 47
Lines 11786 11819 +33
===========================================
- Hits 7514 6291 -1223
- Misses 4272 5528 +1256
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
…olab#47 is merged. Updated the input file archive to include sabet's fuselage FFD
I added the tests from @sseraj's fuselage case. Some points are extremely challenging to converge, but I dont test everything. The set thats actively tested fails w/o the solver fixes in mdolab/pyspline#47 and passes with these fixes. The previous solver also had a termination criteria preventing the most problematic points from working. Now they do work, but you need a ridiculously large number of iterations. I only tested a few like this, but I am disabling them because that FFD is unreasonably skewed. This is ready for review. |
…aptop with 1e-15 rel tolerance. the error is at 1.1e-15. Moved the tolerance to 1e-14, which should be plenty accurate
To dos:
|
All TODOs addressed. This one is ready for review. |
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.
Good stuff, see my suggestions for minor changes below
this is also ready for round 2. thanks again for all the feedback |
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.
Looks good! We can merge this once the pySpline changes are on the Docker images and we rerun the CI.
Purpose
This PR adds the capability of doing coordinate transformations with pygeo. Specifically, we can now have the adflow geometry sit on a different reference frame but have a different reference frame for the parameterization. For example, the FFD can stay roughly aligned with the x-streamwise y-spanwise z-lift directions, whereas the CFD geometry is rotated and displaced. This is achieved by a callback function that the user provides that applies the transformations. Only differences in dvgeo is that we intercept the main add pointset, update, and derivative routines to apply the transformation as the first or the last thing that is done. Derivatives are also transferred with the same approach; we just include all of the rotations but dont apply the transformations. The same method can be implemented in other DVGeo classes as well.
Besides this, the PR has some minor bug fixes. Specifically, defining lower and upper bounds for sectional DVs were broken. This is fixed now. There is also a small fix for using pygeo with the symmetry option, but this may not be fully operational.
Expected time until merged
1-2 weeks
Type of change
Testing
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