Merge rc-5.0.1 to dev (maintenance) - #3474
Merged
Merged
Conversation
…MP data race FVW treecode: the wake path used Tree%DistanceDirect = 2*mean(RegParam), averaged over an over-allocated array whose sentinel tail drove it negative during wake buildup, disabling the near-core direct-evaluation fallback. Replace it with a per-node maxRegParam (max eps over the cell's particles); each branch now uses distDirect = BranchFactor*radius + 2*maxRegParam so control points inside a regularization core fall back to direct evaluation. Applied to both the particle and segment trees. TwrInflArray: make FirstWarn_TowerStrike firstprivate and ErrStat2/ErrMsg2 private in the OpenMP loop to avoid a data race. Co-authored-by: Copilot <[email protected]> Co-authored-by: Claude Opus <[email protected]>
In ui_part_nograd_11 the idRegExp mollifier (1-exp(-(r/rc)^3))/r^3 differs from 1/r^3 by <exp(-8)~3.4e-4 once r>2*rc, which is exactly the accuracy the far-field multipole already accepts at its BranchFactor*radius+2*maxRegParam floor. Treat the mollifier as 1 beyond that boundary (new PART_REG_NRAD/PART_REG_CUT3 params) so the near-field direct kernel and the far-field multipole share the same 2*rc cutoff. Since most near-field tree pairs have r>>rc, this skips exp() for the majority of evaluations, giving ~25-32 percent serial speedup on the treecode path with the output unchanged to ~1.8e-5 relative. Also caches r^2/r^3/rc^3 to drop redundant ** intrinsics; the compact-support branch is refactored identically (bit-for-bit). FVW_Subs: scope the DEV_VERSION NaN/sentinel checks in SegmentsToPartWrap to the active particles (1:nPart); the preallocated tail intentionally keeps its sentinel and must not trip the check. Co-authored-by: Copilot <[email protected]> Co-authored-by: Claude Opus <[email protected]>
OLAF: fix source-panel filename parsing (relative path)
SoilDyn initialization crash: stack overflow with MinGW
…d dispatch to select case Remove always-zero T_Tree%DistanceDirect field and its assignments; the two wake-path reads now pass 0.0_ReKi literally (regularization floor is applied per node via node%maxRegParam). Convert the if/elseif velocity-method dispatch in FVW_InitRegularization, InducedVelocitiesAll_Init/Calc/End and LiftingLineInducedVelocities to select case, adding case default fatal for unhandled methods. Blade-path DistanceDirect (MaxWingLength*2.2) is unchanged. Co-authored-by: Copilot <[email protected]> Co-authored-by: Claude Opus <[email protected]>
Fix OLAF wake time-step detection losing precision over many time steps
AD: fix OLAF treecode near-core regularization floor and TwrInfl OpenMP data race
…o a reusable Calc-only routine
OpenFAST style requires 3 space indentation in Fortran source; tab characters are not allowed because they render inconsistently across editors and break continuation-line alignment. Add a workflow that scans every git-tracked *.f90 / *.F90 file and reports the file, line, and column of each tab found, failing the job if any are present. Findings are also emitted as GitHub annotations so they appear inline on the pull request diff. Registry-generated *_Types.f90 files are excluded from the scan, since they are produced by the OpenFAST Registry rather than edited by hand. Also remove the 7 pre-existing tab characters so the check passes on a clean tree. All were in comments or whitespace-only lines, so there is no change in behavior. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The omega_P description in StrucCtrl_Registry.txt contained tab characters, which the Registry copied verbatim into the generated Doxygen comment in StrucCtrl_Types.f90. Replace them with spaces, matching the alignment of the neighboring alpha_P entry, and regenerate StrucCtrl_Types.f90. Comment text only; no change in behavior. Assisted-by: LLM [Claude Code] [Copilot]
Two issues raised in review of the tab check script: - The repository-root guard was ineffective. When "git rev-parse --show-toplevel" fails it produces no output, and "cd ''" returns 0 and stays in the current directory, so the "|| exit 1" never fired and the script ran on whatever directory it was invoked from. Capture the root first and test that command's status directly. - "grep ... || continue" treated an I/O error (exit 2) the same as "no match" (exit 1), so a file that failed to scan was silently skipped and the job still passed. Skip only on exit 1 and abort on any other non-zero status. Introduce a distinct exit status so a check that could not run never resembles a clean pass: 0 no tabs, 1 tabs found, 2 check could not run. Assisted-by: LLM [Claude Code] [Copilot]
In PackPanelsToSegments, the ground-mirror block reflected segment points and negated circulation but never assigned SegEpsilon for the mirrored half. The image segments therefore kept the -999999 sentinel core size from allocation, which silently disabled or corrupted their Biot-Savart contribution (segment/particle kernels collapse to ~0 for a negative core, and the treecode MAC floor degenerates), so ground effect under ShearModel=1 was under-delivered rather than crashing. Copy the regularization core from each real segment to its image (SegEpsilon(iMirror) = SegEpsilon(i)), which is physically exact since an image vortex shares the core size of its source. Co-authored-by: GitHub Copilot <[email protected]> Co-authored-by: Claude <[email protected]>
Fix missing regularization core on mirrored FVW segments (ShearModel=1)
Two further issues raised in review:
- Excluding files by the "*_Types.f90" name pattern was wrong in both
directions. It skipped six hand-maintained sources that happen to use
that name, among them TurbSim_Types.f90 and ModMesh_Types.f90, so
tabs in them could never be caught; and it still scanned
NWTC_Library_IncSubs.f90, which is Registry-generated but does not
match the pattern. Drop the exclusion and scan every tracked *.f90 /
*.F90 file. When a tab is found in a file carrying the Registry
marker, the report now says so and points at the registry .txt input,
since that is where such a tab has to be fixed.
- The reported column could be wrong. "awk -v" decodes backslash
escapes in the assigned value, so any line containing a backslash --
Doxygen markup such as \f$ or \end{}, or a format string -- shifted
the computed index. Compute the column with parameter expansion
instead, which does no decoding. Line numbers were never affected.
Coverage goes from 267 to 329 scanned files.
Assisted-by: LLM [Claude Code] [Copilot]
The workflow header still claimed that Registry-generated *_Types.f90 files are excluded by the check script. That has not been true since 718f1df, which dropped the exclusion because the name pattern also skipped six hand-maintained sources. Comment only; no change to the workflow's behavior. Assisted-by: LLM [Claude Code] [Copilot]
OLAF: Redundant wake reconstruction for multiple VTK grid outputs
F/gh action tab check
Fix InflowWind Grid3DField fatal error for round-off just below t = 0
…direction-jacobian AD: refresh wind rotations for direction linearization
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
A critical missing T_Tree import prevents compilation, and heterogeneous regularization behavior lacks regression coverage.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Maintenance cross-merge of rc-5.0.1 into dev, covering OLAF, AeroDyn, InflowWind, build, CI, and formatting updates.
Changes:
- Improves OLAF regularization, tree reuse, mirroring, and path handling.
- Updates AeroDyn and InflowWind behavior.
- Adds tab-check CI and MinGW stack configuration.
| File | Description |
|---|---|
modules/servodyn/src/StrucCtrl_Types.f90 |
Removes generated-source tabs. |
modules/servodyn/src/StrucCtrl_Registry.txt |
Cleans registry formatting. |
modules/nwtc-library/src/NWTC_Num.f90 |
Removes documentation tabs. |
modules/nwtc-library/Old_test/Test_MeshMapping/Test_MeshMapping_Mod.f90 |
Cleans whitespace. |
modules/moordyn/src/MoorDyn_Line.f90 |
Removes comment tabs. |
modules/lindyn/src/LinDyn.f90 |
Removes comment tabs. |
modules/inflowwind/src/IfW_FlowField.f90 |
Adjusts periodic time-bound handling. |
modules/aerodyn/src/FVW.f90 |
Reuses wake trees and updates timing tolerance. |
modules/aerodyn/src/FVW_VortexTools.f90 |
Adds per-node regularization limits and related testing. |
modules/aerodyn/src/FVW_Subs.f90 |
Updates mirrored segments and velocity dispatch. |
modules/aerodyn/src/FVW_IO.f90 |
Fixes relative source-panel path parsing. |
modules/aerodyn/src/FVW_BiotSavart.f90 |
Optimizes particle regularization. |
modules/aerodyn/src/AeroDyn.f90 |
Updates OpenMP handling and linearization rotations. |
cmake/OpenfastFortranOptions.cmake |
Increases the MinGW stack size. |
.github/workflows/check-tabs.yml |
Adds the tab-check workflow. |
.github/scripts/check_tabs.sh |
Implements tab scanning and annotations. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
WriteVTKOutputs declares type(T_Tree), which currently resolves only indirectly through the bare `use FVW_Subs`, which in turn does a bare `use FVW_VortexTools`. That works today, but breaks at a distance if FVW_Subs ever gains a private default or narrows its own use clause. Add T_Tree to the existing only-list so the dependency is explicit. No functional change. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
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
Cross-merge of
rc-5.0.1intodev(maintenance). This brings forward the 9 pull requestsmerged to
rc-5.0.1since the last cross-merge (dda62d29c, 2026-08-18, merge based7efb44df),plus one direct commit. 32 commits total.
OLAF / FVW
luwang00/b/OLAF— OLAF treecode near-core regularization floor fix, TwrInfl OpenMP datarace fix, skip particle exp mollifier beyond 2 core radii, remove unused
Tree%DistanceDirect,convert velocity-method dispatch to
select caseluwang00/b/OLAFMirror— restore missing regularization core on mirrored FVW segments(
ShearModel=1); follow-on to AD: fix OLAF treecode near-core regularization floor and TwrInfl OpenMP data race #3430RBergua/OLAF_VTK_grid_outputs— build the wake tree once per VTK write and reuse itacross all grids;
InducedVelocitiesAll_OnGridrefactored into a Calc-only routineRBergua/OLAF-timestep-tolerance-fix— use a DTaero-based tolerance instead of an epsilonfraction; remove
OneMinusEpsilonRBergua/OLAF_filename_parsing—SrcPnlFileparsing fixAeroDyn / InflowWind
Mohammad-Salik/fix/aerodyn-propagation-direction-jacobian— refresh wind rotations forpropagation-direction linearization
RBergua/InflowWind_Grid3DField—GetBoundsTlower bound with grid tolerance, typo fixesBuild / CI
andrew-platt/f/GH_action_tab_check— addcheck_tabs.sh+check-tabs.ymlworkflow andremove existing tabs from Fortran sources
RBergua/SoilDyn_GCC_initialization— CMakeCYGWIN OR MINGWconditionDirect commit (no PR)
6e5f8942c— update r-test pointer for the new aero baselines after AD: refresh wind rotations for direction linearization #3468Related issue, if one exists
N/A — maintenance cross-merge.
Impacted areas of the software
AeroDyn.f90, OLAF/FVW (FVW.f90,FVW_Subs.f90,FVW_BiotSavart.f90,FVW_VortexTools.f90,FVW_IO.f90)IfW_FlowField.f90cmake/OpenfastFortranOptions.cmakereg_tests/r-test— submodule pointer updatedAdditional supporting information
Two changes need attention during verification:
files) and carries the most conflict surface against the AeroDyn work already on
dev.6e5f8942care baseline-changing; the r-test merge must carry the updated results fromboth sides.
The
reg_tests/r-testsubmodule conflict was resolved with a real submodule merge commit(
fbe583ae), whose parents are thedevpointer (8aefcb0e) and therc-5.0.1pointer(
2aa16648).Note that the tab-check workflow added by #3469 now runs against
devfor the first time.Generative AI usage
Claude Code (Opus 5) was used to analyze the commit ranges and assemble this pull request summary.
No source code was generated by AI in this merge.
Co-authored-by: Anthropic Claude [email protected]
Test results, if applicable