Skip to content

Backport #3564 HydroDyn/WAMIT2: swap wave headings when mirroring QTF triangle in Read_DataFile4D - #3566

Merged
luwang00 merged 1 commit into
OpenFAST:rc-5.0.1from
andrew-platt:b/HD_WAMIT2_QTF_heading_backport3564
Dec 3, 2026
Merged

luwang00 merged 1 commit into
OpenFAST:rc-5.0.1from
andrew-platt:b/HD_WAMIT2_QTF_heading_backport3564

Conversation

@andrew-platt

Copy link
Copy Markdown
Collaborator

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 WAMIT2

Generative AI usage
See #3564 for the original change. The cherry-pick onto rc-5.0.1 and 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

…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants