Skip to content

feat(python): bind the raw-line calls and the load Jacobians - #95

Merged
SMI-Lab-Inha merged 2 commits into
devfrom
feat/python-raw-line-bindings
Nov 7, 2026
Merged

SMI-Lab-Inha merged 2 commits into
devfrom
feat/python-raw-line-bindings

Conversation

@SMI-Lab-Inha

Copy link
Copy Markdown
Owner

Summary

The Python package did not bind CableDyn_InitLine, CableDyn_InitLines and CableDyn_CalcOutputDerivatives. CableDyn now has init_line, init_lines and calc_output_derivatives. Arguments follow the C API, with shape, finiteness and dtype checked in Python before the call; the library judges value ranges. calc_output_derivatives returns (loads, dload_dq, dload_dv, dload_da, added_mass).

Checks

64 tests in python/tests/test_raw_lines.py:

  • A raw line against the same line from a deck: 200 steps of prescribed motion at rho_inf 0, 0.4 and 0.8, and 100 steps at a shared point. Loads match to 1e-8 relative.
  • Jacobians against central differences of update_states and calc_output, on four line states, a shared point, and a floater with hydrodynamics.
  • Lifecycle after failed and successful initialisation, on point and aggregate models.

CTest 359 of 359 on the default kernel and with OPENBLAS_CORETYPE=Prescott.

The CHANGELOG entry lands with the release batch.

@SMI-Lab-Inha

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-07T14:36:54.479734Z 5078972 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. Keep them coming!

Reviewed commit: f43f2cff95

ℹ️ 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

read-the-docs-community Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 CableDyn | 🛠️ Build #35720126 | 📁 Comparing 5078972 against latest (3d04008)

  🔍 Preview build  

16 files changed · ± 16 modified

± Modified

Bind CableDyn_InitLine, CableDyn_InitLines and
CableDyn_CalcOutputDerivatives on CableDyn as init_line, init_lines and
calc_output_derivatives.

The arrays are checked for shape, finiteness and integer indices before
the library is called; the library judges the values. Indices stay 1-based
as in the C API. A failed call keeps the book-keeping of a model that
survives it and drops that of one that does not. The Jacobians are read
column-major, so J[i, j] is the derivative of load i with respect to
coupled DOF j. The unused eps_fd argument is not exposed.

Raw lines match the same lines from a deck over a prescribed motion, also
at a shared point, and the Jacobians match finite differences of
update_states and calc_output.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
@SMI-Lab-Inha
SMI-Lab-Inha force-pushed the feat/python-raw-line-bindings branch from f43f2cf to 5078972 Compare November 7, 2026 14:35
@SMI-Lab-Inha

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 507897281d

ℹ️ 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".

@SMI-Lab-Inha
SMI-Lab-Inha merged commit fc16ce7 into dev Nov 7, 2026
21 checks passed
@SMI-Lab-Inha
SMI-Lab-Inha deleted the feat/python-raw-line-bindings branch November 7, 2026 17:05
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