Skip to content

Improve deform: linear interpolation for twist and average local airfoil normal#234

Open
1-Bart-1 wants to merge 6 commits into
mainfrom
improve-deform
Open

Improve deform: linear interpolation for twist and average local airfoil normal#234
1-Bart-1 wants to merge 6 commits into
mainfrom
improve-deform

Conversation

@1-Bart-1
Copy link
Copy Markdown
Member

No description provided.

@1-Bart-1 1-Bart-1 requested a review from ufechner7 May 11, 2026 14:37
@codecov
Copy link
Copy Markdown

codecov Bot commented May 11, 2026

Codecov Report

❌ Patch coverage is 91.66667% with 12 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/wing_geometry.jl 91.48% 12 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 during refine! / 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.

Comment thread src/wing_geometry.jl Outdated
Comment thread src/wing_geometry.jl Outdated
Comment thread src/wing_geometry.jl
Comment thread src/wing_geometry.jl Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants