Axisymmetric mesh warping capability
Purpose
This PR adds axisymmetric mesh warping capability for structured meshes to IDWarp. The process is detailed as follows:
First, the user specifies two CGNS mesh families that represent the two symmetry planes of the axisymmetric wedge. Other inputs are the rotation axis and rotation angle. One symmetry plane is selected to be the "mirror plane" for the warping operation. IDWarp computes the average normal vector of the mirror plane and stores the necessary topology information in the Fortran layer. To warp the mesh, the nodes are first duplicated across the mirror plane. Then, the mesh is warped as usual. At this stage, only the nodes along the mirror plane itself are valid because the weighting terms are only equal on both sides along that plane.
Once the warping is completed, the warped nodes are then rotated to the other symmetry plane about the axisymmetric axis. The derivatives of the node transformation are computed by hand in the Fortran layer.
This PR should remain a draft until the following items are addressed:
- [ ] Refactor the python layer to remove duplication for multiple mesh types (USMesh, Axisymm, etc...)
- [ ] Make the method invariant to axisymmetric mesh topology (currently requires a specific topology and orientation)
- [ ] Add unit and regression testing for the axisymmetric setup, warping, and derivatives
- [ ] Improve the option naming scheme and simplify the user inputs
- [ ] Detailed documentation on axisymmetric mesh requirements and method setup
Expected time until merged
No set timeline, but most likely a few months.
Type of change
- [ ] Bugfix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (non-backwards-compatible fix or feature)
- [ ] Code style update (formatting, renaming)
- [x] Refactoring (no functional changes, no API changes)
- [x] Documentation update
- [ ] Maintenance update
- [ ] Other (please describe)
Testing
This PR can be tested with a simply axisymmetric wedge mesh with an external run script. No testing is implemented yet.
Checklist
- [x] I have run
flake8andblackto make sure the Python code adheres to PEP-8 and is consistently formatted - [x] I have formatted the Fortran code with
fprettifyor C/C++ code withclang-formatas 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
Codecov Report
Attention: Patch coverage is 16.96970% with 274 lines in your changes missing coverage. Please review.
Project coverage is 56.16%. Comparing base (
647fd8f) to head (9f88c06).
| Files with missing lines | Patch % | Lines |
|---|---|---|
| idwarp/AxisymmetricMesh.py | 15.23% | 267 Missing :warning: |
| idwarp/AxisymmetricMesh_C.py | 41.66% | 7 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #103 +/- ##
===========================================
- Coverage 73.31% 56.16% -17.15%
===========================================
Files 6 8 +2
Lines 757 1086 +329
===========================================
+ Hits 555 610 +55
- Misses 202 476 +274
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.