Skip to content

perf(openfast): skip the discarded cable reactions in CalcOutput - #36

Merged
SMI-Lab-Inha merged 1 commit into
devfrom
perf/calcout-save-kinematics
Oct 21, 2026
Merged

SMI-Lab-Inha merged 1 commit into
devfrom
perf/calcout-save-kinematics

Conversation

@SMI-Lab-Inha

Copy link
Copy Markdown
Owner

Summary

First optimisation from the profiles of #34 and #35. At the glue rate (nsuper = 1), CalcOutput does four things:

  1. saves the committed coupled kinematics;
  2. transfers the current ones;
  3. evaluates the loads and channels;
  4. restores the committed state.

Step 1 read the kinematics with CD_AGG_GetMovingPointMesh. That call also evaluated the reaction of every finite-EI cable, which is a full residual and added-mass assembly of the line. The caller then overwrote the result with the loads from step 3.

  • CD_AGG_GetMovingPointMesh takes an optional cable_loads = .FALSE.. It skips the cable reactions and returns their load columns as zero.
  • The CalcOutput save uses it.
  • Why outputs cannot change:
    • The reactions write only the cable's scratch.
    • At nsuper = 1 every call then evaluates the loads, which overwrite that scratch, before anything reads it.
    • The supercycled path has no save.

Measurement

IEA-15 VolturnUS-S, DLC-1.6 environment, 600 s at dtM = DT = 0.025 s, OMP_NUM_THREADS=1, CABLEDYN_PROFILE=1.

Chain only Chain + 248-element power cable
Wall time, before → after 133 → 134 s 227 → 212 s
CalcOutput 5.9 → 6.1 s 40.9 → 25.0 s
– kinematics overlay 0.34 → 0.28 s 17.4 → 1.2 s
OpenFAST .out and CableDyn .CD.out byte-identical byte-identical

Tests

  • test_openfast_aggregate, no-advance transfer case: a kinematics-only read must:
    • return the same kinematics and mooring load bit for bit;
    • return zero cable load;
    • leave the next cable reaction unchanged.
  • Full suite (Windows, gfortran, Release, slow tier included): 293/293. Python: 2038 passed. pre-commit run --all-files and the Sphinx build with -W pass. OpenFAST builds.

Checklist

  • pre-commit run --all-files passes
  • ctest --test-dir build --output-on-failure passes
  • python -m pytest tests python/tests passes (if Python or validation records changed)
  • VALIDATION.md updated if a validation result changed (none changed)
  • CHANGELOG.md updated under [Unreleased] (heading added if missing) for user-visible changes
  • Documentation in doc/ updated for changed inputs, options, or outputs (no input, option or output changed)
  • Conventional Commit title (feat:, fix:, docs:, ...)
  • Commits are signed off (git commit -s) under the
    Developer Certificate of Origin

At the glue rate (nsuper = 1) CalcOutput saves the committed coupled
kinematics, transfers the current ones, evaluates the loads and channels
and restores the committed state. The save read the kinematics with
CD_AGG_GetMovingPointMesh, which also evaluated the reaction of every
finite-EI cable (a full residual and added-mass assembly) only for the
caller to overwrite it with the loads evaluated after the transfer.
The profile put this at 17 of the 41 s of CalcOutput in a 600 s run of
the IEA-15 VolturnUS-S with a 248-element power cable.

CD_AGG_GetMovingPointMesh takes an optional cable_loads = .FALSE. that
skips the cable reactions and returns their load columns as zero; the
save uses it. The reactions write only the cable's scratch, which the
loads evaluation that follows overwrites, so the outputs are unchanged:
the coupled chain-only and mixed runs write byte-identical OpenFAST and
CableDyn outputs, and the mixed run takes 212 s instead of 227 s.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
@SMI-Lab-Inha

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T04:49:46.372647Z 1f9bbbf Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 1f9bbbf8e5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 CableDyn | 🛠️ Build #35287668 | 📁 Comparing 1f9bbbf against latest (d3ddfeb)

  🔍 Preview build  

3 files changed
± changelog.html
± cli.html
± faq.html

@SMI-Lab-Inha
SMI-Lab-Inha merged commit 8c1f525 into dev Oct 21, 2026
15 checks passed
@SMI-Lab-Inha
SMI-Lab-Inha deleted the perf/calcout-save-kinematics branch October 21, 2026 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant