Add benchmarking for refinement method and reduce allocations#213
Merged
Add benchmarking for refinement method and reduce allocations#213
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
113574c to
c718fb1
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds allocation-focused benchmarks and tests around wing mesh refinement, while refactoring refinement and billowing internals to reduce heap allocations (primarily by avoiding temporary matrices/vectors and using scalar/SVector arithmetic).
Changes:
- Refactors
refine!helpers to reduce allocations (skip unnecessary sorting, remove LE/TE matrix extraction, scalar center-distance math, zero-copy aero interpolation). - Reworks billowing utilities to avoid
MVec3temporaries by introducingrotated_teand using scalar/SVector arithmetic inbillowing_arc_lengthandapply_billowing_to_pair!. - Adds new correctness tests for
UNCHANGED,COSINE, andSPLIT_PROVIDEDrefinement behavior, plus new allocation benchmarks for refinement and billowing helpers.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/wing_geometry.jl |
Refines section sorting, mapping computation, aero interpolation, linear/cosine refinement, and billowing math to reduce allocations. |
test/bench.jl |
Adds allocation benchmarks for refine!, billowing_arc_length, and apply_billowing_to_pair!. |
test/wing_geometry/test_wing_geometry.jl |
Adds refinement correctness tests for UNCHANGED, COSINE, and SPLIT_PROVIDED. |
test/wing_geometry/test_billowing.jl |
Updates tests to use the new rotated_te helper instead of rodrigues_rotate. |
💡 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.