Improve deform: linear interpolation for twist and average local airfoil normal#234
Open
1-Bart-1 wants to merge 6 commits into
Open
Improve deform: linear interpolation for twist and average local airfoil normal#2341-Bart-1 wants to merge 6 commits into
1-Bart-1 wants to merge 6 commits into
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates wing deformation behavior to use linear interpolation from unrefined-section inputs to refined sections (with per-panel values computed as averages), and adjusts the twist axis definition to use an averaged local airfoil normal/spanwise direction. It also adds cached interpolation weights/indices computed at refinement time and updates tests accordingly.
Changes:
- Add per-refined-section interpolation cache (
refined_section_left_idx/refined_section_weight) and compute it duringrefine!/ OBJ refinement. - Update
unrefined_deform!to use cached linear interpolation (unrefined → refined sections) and fill per-panel distributions by averaging adjacent refined-section values. - Update deformation-related tests (YAML and OBJ) to validate the new interpolation/axis behavior and tighten one tolerance.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/yaml_geometry/test_yaml_wing_deformation.jl | Replaces mapping/smoothing tests with assertions for linear interpolation, endpoint behavior, and no-overshoot properties. |
| test/ram_geometry/test_kite_geometry.jl | Samples a more specific “apex” panel and tightens the y-coordinate preservation tolerance under twist. |
| src/wing_geometry.jl | Adds interpolation cache fields, computes them during refinement, and rewires unrefined_deform!/twist application to use linear interpolation and refined-section twist application. |
| src/solver.jl | Ensures the new interpolation cache is copied when converting a wing to a different element type. |
| src/obj_geometry.jl | Computes the interpolation cache during OBJ refinement and initializes the new fields in ObjWing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.