Conversation
compute_refined_panel_mapping! kept the first section on a tie, so a mirror-symmetric three-section wing put both midway panels on the same side. Distances within 1e-9 relative now tie, and the tie goes to the section farther from the middle of the span along spanwise_direction. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Sep 30, 2026
…anel mapping allocates nothing refine! on the 20-panel LINEAR wing of test/bench.jl was back at 133 allocations (limit 70): the generator sum and extrema in the span-position tie-break allocated 64 per mapping. Now 0 per mapping and 69 per refine!. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This branch has not been deployed
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.
TL;DR
compute_refined_panel_mapping!gave an exact tie to the first section, so a mirror-symmetric three-section wing mapped its two midway panels to the same side and yawed with no deformation. A tie now goes to the section farther from the middle of the span, so mirror panels map to mirror sections.What was wrong
Each refined panel maps to the unrefined section whose centre is nearest, with a strict
<. Three sections at y = 1, 0, −1 and ten LINEAR panels put panel 3 (centre y = 0.5) and panel 8 (y = −0.5) exactly midway between two sections. Both ties went to the lower index, giving[1, 1, 1, 2, 2, 2, 2, 2, 3, 3]: panel 3 to the left tip, panel 8 to the centre.It surfaced in OpenSourceAWE/SymbolicAWEModels.jl#397. There the 2-plate particle kite, perfectly mirror-symmetric, gets its point forces from this mapping. With the lopsided map its flat case yaws with Mz = 2.15 N·m where 0 is right, and
test_aero_modes' yaw antisymmetry and pose-sweep checks fail. On SymbolicAWEModelsmainthe same kite passes only because its last-digit rounding happened to break both ties outward. #397 changes those digits, and the mapping flips.The change
Sections within
1e-9of the nearest distance, relative, count as tied. A tie goes to the section whose centre is farther from the middle of the span, measured alongspanwise_direction. Without a tie nothing changes. The three existing mapping testsets, which rebuild the nearest section by hand, pass unchanged. The span positions are summed by hand rather than through generators, so the mapping allocates nothing.Verification
test/wing_geometry/test_wing_geometry.jl"a panel midway between two sections maps outboard": red on v6.0.0 (Int16[1, 1, 1, 2, 2, 2, 2, 2, 3, 3]), green after (302 + 1 passed). Run in SymbolicAWEModels' juliaserver session with this branch developed in.test_aero_modes.jlwith this mapping: direct particle yaw Mz(±d) = ∓0.581, flat 5.8e-9, the same as SymbolicAWEModels main.test/bench.jl"Refinement Allocation Tests": the first push (1d6fb24) took LINEARrefine!to 133 allocations against a limit of 70, red in this PR's CI. That was 64 allocations inside the mapping, from a generatorsumandextrema. With scalar arithmetic the mapping makes 0 andrefine!makes 69 / 69 / 92 / 4 / 132 (LINEAR, COSINE, SPLIT_PROVIDED, UNCHANGED, BILLOWING; limits 70 / 70 / 100 / 5 / 140).bench.jlplustest_wing_geometry.jl: 324 of 324 pass, in this repo'stestenvironment.test/solver/test_unrefined_dist.jl(40) andtest/test_refinement_validation.jl(15): 55 of 55 pass, same environment.Scope
+58 / −8 in
src/wing_geometry.jl, its test,private_functions.mdand the changelog. SymbolicAWEModels#397 needs it released before its CI can pass.Opened by
1-Bort-1, an AI agent working for @1-Bart-1.From OpenSourceAWE/SymbolicAWEModels.jl#376 · task
SymbolicAWEModels.jl-376