Skip to content

cross merge of rc-5.0.1 to dev - #3411

Merged
andrew-platt merged 75 commits into
devfrom
m/rc-5.0.1_to_dev
Jul 30, 2026
Merged

cross merge of rc-5.0.1 to dev#3411
andrew-platt merged 75 commits into
devfrom
m/rc-5.0.1_to_dev

Conversation

@andrew-platt

Copy link
Copy Markdown
Collaborator

Ready to merge

Feature or improvement description
Several more fixes have been added to rc-5.0.1 - this PR merges those to dev.

andrew-platt and others added 30 commits June 2, 2026 14:31
The third term in the calculation was incorrect.  This routine has not been used since it was added in 2014, so no results will be affected.

This was reported on the forum here: https://forums.nlr.gov/t/beamdyn-questions/9518/3
[BugFix] Error in `Quaternion_to_DCM` calculation
…mary file

Update AllFmt format strings in BeamDyn_IO.f90 for Init_Nodes and Init_QP
arrays to use proper spacing and trailing comma in Fortran format specs.
This was preventing writing of this information.

Remove redundant format statement from yaml_write_array2R[48]
I missed the usage of it right afterwards
Fix format issue preventing fields from appearing in BeamDyn YAML summary file
andrew-platt and others added 20 commits July 15, 2026 09:17
OLAF: Fix incorrect VTK grid output filename on first write
InflowWind Hub Velocity Mapping for MHKs
SubDyn output improvements: beam self-weight consistency, end-node forces, and revolute joint fixes
The extra AWAE_UpdateStates call in FARM_UpdateStates was an error that
occurred during development of the timing instrumentation. It caused
AWAE_UpdateStates to be called twice per time step (once in UpdateStates
and once in CalcOutput), which would double-advance the WAT tracer and
perform redundant ambient wind file I/O.

Co-authored-by: GitHub Copilot <copilot@github.com>
Co-authored-by: Anthropic Claude <claude@anthropic.com>
Include AWAE_timings.f90 in the AWAE project and FAST_Farm_timings.f90
in the FAST.Farm project for Visual Studio builds.

Co-authored-by: GitHub Copilot <copilot@github.com>
Co-authored-by: Anthropic Claude <claude@anthropic.com>
When git describe fails (e.g. shallow clone with no reachable tags),
fall back to git rev-parse --short=8 HEAD to retrieve the commit hash,
with a dirty working tree check. Applies to both the CMake build
(GetGitRevisionDescription.cmake) and VS build (CreateGitVersion.bat).

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: GitHub Copilot <noreply@github.com>
GH copilot review comments.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Fall back to git rev-parse for version info on shallow clones
When using Simplified ElastoDyn (CompElast=3) with VTK output enabled,
Init%OutData_ED was never allocated, causing an out-of-bounds access at
the SetVTKParameters call site. Additionally, SetVTKParameters itself
had several unguarded accesses to ED data structures.

Fixes:
- Guard call site with allocated() check, pass dummy when ED unused
- Add Module_SED case for BladeLength/HubRad in SetVTKParameters
- Use SED%y%TowerLn2Mesh for tower mesh when CompElast=SED (add TARGET)
- Handle SED in blade surface section (no BladeLn2Mesh available)

Co-authored-by: GitHub Copilot (Claude Opus 4) <noreply@github.com>
Co-authored-by: Claude <noreply@anthropic.com>
When GenDOF is True and both RotIner and GenIner are zero, the
drivetrain inertia J_DT is zero, causing division by zero in
SED_CalcContStateDeriv. This produced NaN states that propagated
through the hub orientation into InflowWind, manifesting as a
cryptic 'GF wind array exhausted at NaN seconds' error.

Add an initialization check that reports a clear fatal error
explaining the issue and how to fix it.

Co-authored-by: GitHub Copilot (Claude Opus 4) <noreply@github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Fix SED crashes: VTK segfault and zero-inertia NaN propagation
Add timing print-outs to FAST.Farm
This function was never called anywhere in the codebase and contained
bugs (missing factors of 2 on several off-diagonal terms). The actively
used replacement is quat_to_dcm in ModVar.f90.
This function was never called anywhere in the codebase. The actively
used replacements are dcm_to_quat and dcm_to_quat2 in ModVar.f90.
Remove Quaternion_Conjugate, Quaternion_Norm, Quaternion_Power,
Quaternion_Product, and Quaternion_Interp. None are called anywhere
in the codebase. The ModVar.f90 quaternion routines (quat_compose,
quat_inv, etc.) have replaced them. Note: the Quaternion type in
NWTC_Library_Types.f90 is registry-generated and should be removed
from the registry input separately.
Remove the Quaternion derived type from Registry_NWTC_Library_base.txt
and regenerate NWTC_Library_Types.f90. This type was only used by the
dead Quaternion_* functions removed in the previous commits.
@andrew-platt
andrew-platt requested a review from luwang00 July 30, 2026 16:32
@andrew-platt andrew-platt self-assigned this Jul 30, 2026
@andrew-platt andrew-platt added the Code-dev: cross-merge maintenance Cross-merges between development branches. This is mostly code development maintenance. label Jul 30, 2026
@andrew-platt

Copy link
Copy Markdown
Collaborator Author
  • r-test cross merging also required.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 cross-merges additional fixes from rc-5.0.1 into dev, spanning build/project files, SubDyn output-force handling (including floating self-weight behavior and end-node extrapolation), FAST.Farm timing instrumentation, and several robustness improvements (git version fallback and output memory guardrails).

Changes:

  • Add optional FAST.Farm/AWAE timing instrumentation (compile-time gated) plus Visual Studio project updates to include the new timing sources.
  • Update SubDyn member load outputs: remove inertial (mass) component channels, add end-node force extrapolation support, and revise documentation accordingly; add a new SubDyn regression test entry.
  • Improve operational robustness: git revision fallback for shallow clones (CMake + Windows batch) and a 2GB memory-limit guard for in-memory binary output storage; widen console output line support and fix YAML array formatting usage.

Reviewed changes

Copilot reviewed 39 out of 42 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
vs-build/modules/AWAE.vfproj Adds AWAE timing source to the VS project so optional timing builds work in Visual Studio.
vs-build/glue-codes/FAST.Farm.vfproj Adds FAST.Farm timing source to the VS project.
vs-build/CreateGitVersion.bat Adds fallback to short hash (and “-dirty”) when git describe fails (e.g., shallow clones).
reg_tests/CTestList.cmake Cleans whitespace and adds a new SubDyn regression test entry.
modules/subdyn/src/SubDyn_Types.f90 Updates MeshAuxDataType by removing Me and adding extrap; updates copy/destroy/pack/unpack accordingly.
modules/subdyn/src/SubDyn_Registry.txt Keeps registry in sync with SubDyn type changes (Me removed, extrap added).
modules/subdyn/src/SubDyn_Output.f90 Major SubDyn output refactor: remove inertial-force outputs, add end-node extrapolation, adjust OutAll sizing/packing, and revise force reconstruction.
modules/simple-elastodyn/src/SED.f90 Adds fatal validation preventing divide-by-zero when GenDOF is enabled with zero drivetrain inertia.
modules/openfast-library/src/FAST_Subs.f90 MHK hub-position frame shift for InflowWind; VTK init supports SED; adds 2GB guard for in-memory AllOutData.
modules/openfast-library/src/FAST_Mapping.f90 Applies the same MHK hub-position frame shift at runtime during mapping (ED + SED paths).
modules/nwtc-library/src/YAML.f90 Adjusts YAML format construction for 2D real arrays when AllFmt is provided.
modules/nwtc-library/src/SysMatlabWindows.f90 Increases WrScr max line length constant to 256.
modules/nwtc-library/src/SysMatlabLinuxIntel.f90 Increases WrScr max line length constant to 256.
modules/nwtc-library/src/SysMatlabLinuxGnu.f90 Increases WrScr max line length constant to 256.
modules/nwtc-library/src/SysIVF.f90 Increases WrScr max line length constant to 256.
modules/nwtc-library/src/SysIVF_Labview.f90 Increases WrScr max line length constant to 256.
modules/nwtc-library/src/SysIFL.f90 Increases WrScr max line length constant to 256.
modules/nwtc-library/src/SysGnuWin.f90 Increases WrScr max line length constant to 256.
modules/nwtc-library/src/SysGnuLinux.f90 Increases WrScr max line length constant to 256.
modules/nwtc-library/src/SysFlangLinux.f90 Increases WrScr max line length constant to 256.
modules/nwtc-library/src/Registry_NWTC_Library.txt Removes quaternion registry entries (consistent with quaternion type removal).
modules/nwtc-library/src/Registry_NWTC_Library_base.txt Removes quaternion registry entries (consistent with quaternion type removal).
modules/nwtc-library/src/NWTC_Num.f90 Removes a block of quaternion helper functions.
modules/nwtc-library/src/NWTC_Library_Types.f90 Removes Quaternion type and its pack/copy routines from generated types file.
modules/nwtc-library/src/NWTC_IO.f90 Prevents integer overflow in allocation error-message byte counts; widens WrScr indent formatting.
modules/beamdyn/src/BeamDyn_IO.f90 Updates YAML AllFmt usage (spacing around comma separators).
modules/awae/src/AWAE.f90 Adds compile-time timing hooks and public timing API exports behind FF_TIMING_PRINTS.
modules/awae/src/AWAE_timings.f90 New timing accumulator module for AWAE (compile-time gated).
modules/awae/CMakeLists.txt Adds FASTFARM_TIMING_PRINTS option wiring: sources + FF_TIMING_PRINTS define for AWAE.
modules/aerodyn/src/FVW.f90 Minor formatting touch-ups in several routines within FVW.
glue-codes/fast-farm/src/FAST_Farm.f90 Adds stage-level timing hooks (compile-time gated) and prints timing summary at end.
glue-codes/fast-farm/src/FAST_Farm_timings.f90 New FAST.Farm timing aggregation/reporting module (compile-time gated).
glue-codes/fast-farm/src/FAST_Farm_Subs.f90 Adds detailed stage timing instrumentation across init/US/CO/end paths (compile-time gated).
glue-codes/fast-farm/CMakeLists.txt Adds FASTFARM_TIMING_PRINTS option wiring: sources + FF_TIMING_PRINTS define for FAST.Farm.
docs/source/user/subdyn/theory.rst Updates SubDyn theory to reflect revised self-weight handling and nodal load reconstruction (averaging/extrapolation).
docs/source/user/subdyn/appendixD.rst Removes inertial (FM/MM) channel documentation; updates force-channel descriptions.
CMakeLists.txt Adds FASTFARM_TIMING_PRINTS option to the project configuration.
cmake/GetGitRevisionDescription.cmake Adds fallback to short hash (and “-dirty”) when git describe fails.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread modules/awae/src/AWAE_timings.f90 Outdated
Comment thread modules/aerodyn/src/FVW.f90 Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@andrew-platt
andrew-platt merged commit e952129 into dev Jul 30, 2026
42 of 43 checks passed
@andrew-platt
andrew-platt deleted the m/rc-5.0.1_to_dev branch July 30, 2026 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Code-dev: cross-merge maintenance Cross-merges between development branches. This is mostly code development maintenance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants