Repository navigation
Backport #3564 HydroDyn/WAMIT2: swap wave headings when mirroring QTF triangle in Read_DataFile4D - #3566
Merged
luwang00 merged 1 commit intoDec 3, 2026
Conversation
…ad_DataFile4D Read_DataFile4D filled the missing triangle of the 4-D QTF table by exchanging only the two frequency indices, leaving the heading indices in place. Exchanging the two wave components exchanges both frequency and heading: F+(w_m,w_n,b_m,b_n) = F+(w_n,w_m,b_n,b_m) F-(w_m,w_n,b_m,b_n) = [F-(w_n,w_m,b_n,b_m)]* For multi-heading .12d/.12s files this gave silently wrong second-order loads (when a mirrored entry with b1 /= b2 is used, including via the 4-D interpolation near the w1 = w2 diagonal) or a spurious "contains different values" FATAL error on a valid, fully populated table. Swap the heading indices (3,4) together with the frequency indices (1,2), test the mask at the swapped location, and only apply the mirror when the two heading sets are the same grid. Update the doc comment accordingly. Single-heading QTF files and unidirectional seas are unaffected. Fixes OpenFAST#3563
luwang00
approved these changes
Dec 3, 2026
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.
Ready to merge
Feature or improvement description
This is a backport of #3564 - see that PR for details
Related issue, if one exists
#3564, #3563
Impacted areas of the software
HydroDyn only: reading of multi-heading full QTF files (
.12d/.12s) in WAMIT2Generative AI usage
See #3564 for the original change. The cherry-pick onto
rc-5.0.1and this PR were done with Claude Code.Test results, if applicable
No test results change (all QTF files in the r-test are single-heading)
🤖 Generated with Claude Code