Repository navigation
fix: CableDyn reader files and OPTIONS, early cable_source check; CableDyn 0.4 docs - #15
Conversation
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
…leDyn 0.4 docs read_cabledyn_sections left the per-line .p.out and .t.out readers open after every read (ResourceWarning) and after a failed one: the chunk streams were zipped and the last of them never reached its end. Each stream now reads through pd.read_csv as a context manager and every stream is closed in a finally. The files of one run must also end on the same row; extra rows hidden by a chunk boundary were dropped before. read_cabledyn_deck took the second token of every OPTIONS row as the keyword, so the positional record "uniform 0.0 0.6 0.0 current" became a keyword "0.0". It now reads CableDyn's record forms (value keyword [commentary]; model, numbers, keyword; keyword-first dynamic_solver; a "-" description), the last record of a keyword wins as in CableDyn (the first won), and the aliases gravity, WtrDnsty/water_density, water_depth and dt set g, rhoW, WtrDpth and dtM (they were ignored). run_sea_state_batch checks and digests cable_source before any run is read; a missing file failed only after every section was computed. The global-local guide (Sections 1, 2, 2.1 and 7), ARCHITECTURE.md and the reader's docstring now describe CableDyn 0.4.x: nodal-equilibrium recovery of tension, curvature and bend moment (since 0.2.0), the signed section-axis components CurvX/CurvY and torsion of lines restrained at one end (since 0.4.0), and the node tangent of finite-EI lines in Dec/Azi (since 0.4.2). The compute_mkappa docstring states that tension_N is the true wall tension. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
56281b7 to
76ba1fe
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Summary
Fixes to the CableDyn reader and the batch inputs, and the CableDyn description brought up to CableDyn 0.4.x.
read_cabledyn_sectionsfile handles.p.out/.t.outleft open after every read (ResourceWarning) and after a failed onefinally;pd.read_csv(chunksize=...)used as a context manageruniform 0.0 0.6 0.0 current0.0, valueuniformcurrent=uniform 0.0 0.6 0.0gravity,WtrDnsty/water_density,water_depth,dtWtrDnsty 1000gave 1025 kg/m³)g,rhoW,WtrDpth,dtMrun_sea_state_batch(cable_source=...)OPTIONS record forms
These follow CableDyn's
doc/options.rst:value keyword [commentary]current,waves,wavetrain)dynamic_solverrow-starts a descriptionThe keyword is the first token after the first token that is not a number.
Docs
The global–local guide (Sections 1, 2, 2.1 and 7),
ARCHITECTURE.mdand the reader's module docstring described CableDyn 0.1.x. Each fact was checked against CableDyndev(doc/driver_format.md,doc/outputs.rst,doc/theory.rst,CHANGELOG.md):Ten,CurvandBendMomrecovered from nodal equilibrium (since 0.2.0), withOutputRecovery elementrestoring the element definitions;CurvX/CurvY(since 0.4.0): how their axes start on lines with and without a torsion restraint, and how a station of a.outfile is read withseries_from_curvature_components;Twistonly at two-end restraint and appliesTwistwherever it is written;Dec/Azion finite-EI lines are the node's own Hermite tangent since 0.4.2, the chord before.The
compute_mkappadocstring now states thattension_Nis the true wall tension (as incompute_fatigue) and how to convert an effective tension.Open item, documented and not changed here. The tangent reader places every
Dec/Azivalue at the mid-arc of its chord. On 0.4.2 output that is right for interior nodes of a uniform mesh but puts an end node's tangent half an element inside the line. Reading the end tangent at the node needs a reader option or version detection, so it is left for a separate change.Tests
test_reader_closes_every_output_file: a read in several chunks, and a per-line file with an extra row. Both run underResourceWarningcapture withgc.collect()and must leave no file open.test_deck_options_follow_the_record_forms: positional, commentary,dynamic_solver, aliases and last-wins.test_cable_source_is_checked_before_any_run_is_read.dev. The third fails ondevonce its match names the missing file.Gates
src)CABLEXSEC_DISABLE_NUMBA=1No validation record changes. The branch is rebased on #14, #16 and #17, and the gates above are on the rebased tree.
run_validation.py --checkreports the committed report as current. Regenerating it changes only round-off cells within their tolerance classes, so it is kept unchanged.