cross merge of rc-5.0.1 to dev - #3411
Merged
Merged
Conversation
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
… option introduced in the previous commit 9450632
…e pretension in Fg
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.
…o_DCM Remove dead Quaternion routines
Collaborator
Author
|
Contributor
There was a problem hiding this comment.
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.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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
Several more fixes have been added to rc-5.0.1 - this PR merges those to dev.