Repository navigation
fix(statics): refine locally; robust attachment polish - #29
Conversation
- A finite-EI static solve whose resolution check failed refined the whole line uniformly, up to 16x, even when one region was coarse: two decks went from 462 to 7392 elements and took 6-13 s. AutoMesh now refines locally (option local_refinement, on for every deck route): only the elements whose curvature resolution, bending length, boundary layer or contact change requires it are split into 2-16 equal children, graded so neighbours differ by at most a factor of two. The pass starts under exactly the old conditions, the caps and audits are unchanged. R6: 6.6 s / 7392 elements -> 0.30 s / 492 (end tensions within 3.5e-7, nodes 0.7 mm); the statics matrix refining decks 76 -> 31 s CPU, results within 0.21 % of peak end tension of the uniform refinement. Decks that do not refine are byte-identical. - The attachment polish of a lazy wave with 25 discrete buoyancy modules on a refined mesh in a 0.3 m/s cross current failed at load fraction 0.125 (seabed friction: the first Newton update raised the residual 300-fold). A failed step is now retried from the last converged state with pseudo-transient continuation, the merit line search and halved load steps down to 1/1024; the case solves within 0.04 % (fairlead) / 0.2 % (anchor) of its smeared twin. Decks whose steps converge take the unchanged path. Tests: attachment_cross_current (four discrete-module decks against smeared twins), local-mode AutoMesh cases. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
A discrete attachment equilibrium that the damped Newton solves did not reach alone (pseudo-transient continuation, line search or smaller load steps) is now put through the checks the smeared state passed: the kink limit, the tensile contract under tensile_safety True, the physical-branch audit and the stability test with the static constraints. The solve fails closed naming the failed check. A polish whose Newton solves all converge is not checked again, so its output is unchanged. The attachment polish allows at most 32 failed load steps in all; a step that converged at one size and failed at twice it could otherwise cycle about a thousand times. Its failure message names the load fraction of the first failed solve and the load fraction the homotopy reached; a failure of the drag fixed point names that solve. Local refinement: where a pass would exceed the element limit, the bending-length levels give way first (a level at a time, graded), then the grading, and only then the h*kappa, end-layer and contact needs. The pass cap of 12 now bounds the local resolution passes (the cumulative factor no longer keeps them going), and in the local mode an axial pass is bounded by its own pass cap. applied_scale in the local mode is the largest factor of any element after axial passes too, so the "adaptive refinement stopped at Nx" note is truthful. Documentation: node output channels on a refined line number the nodes of the refined mesh while names are validated against the deck node count, and .static.out or .elements.out give the node arc positions; the "refined to ... elements" note also follows the uniform refinement of a coarse deck mesh whose continuation or polish failed; the attachment failure message and its checks are described. Tests: the local refinement case checks that new neighbour length jumps stay within 2x (the deck's own jump excepted), and a new case checks that the element limit keeps the h*kappa levels and gives up a bending-length level (it fails with the former uniform reduction). Decks that do not refine, and attachment decks whose polish converges without its fallbacks, give identical output. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
The acceptance checks of a discrete attachment state reached with the polish fallbacks applied the kink limit to every element. A lumped load turns the line by a slope jump at its node, which the C1 elements beside the node carry as h*kappa of about twice the jump at any mesh size, so a heavy module on a slack stretch failed closed on the fallback path while the same equilibrium was accepted when Newton converged plainly. The kink limit now applies away from the attachment nodes; the tensile contract, the fold, loop and self-contact audit (its own kink test left to that check) and the stability test are unchanged. The checks moved into CD_Attachment_Discrete_Verdict, public for its unit test, and a state that passes them is reported in a note. The polish step controller doubled a halved step after a single converged step, so a homotopy converging steadily at 1/32 or 1/64 of the load ran into the 32-failure budget at a load fraction of 0.94 or 0.45. A halved step now doubles after two consecutive converged steps of its size, and each time a doubled step fails the number of converged steps a doubling waits for doubles; such a homotopy keeps advancing and tries the larger size about ten times at most. At most 64 load steps may fail in all, a backstop with at most 1024 converged steps. In the local mode, a refinement that stops short of its target names what stopped it (the element limit, the 12-pass or 16-axial-pass limit) instead of "refinement cap exhausted", which remains for the per-element cap. Documentation: the node channels note in outputs.rst names the silent refinements (adaptive_mesh, torsion, the axial passes of tensile_safety True), gives the End B node by ReferenceArcEnd, and says that node counts and arc positions follow the static state (for example an OpenFAST start with PtfmInit against the deck positions). The iteration budget comment of the polish counts the first failed step correctly, and the comment on the friction pull test names the arcs of N26 and N28 in the 1-based channel convention. Tests: a unit case of the verdict (a slope jump beside the module accepted; the same bend away from it, a compressed state under tensile_safety and an unstable state rejected by name), and the cross-current test requires the fallback note on its fallback case. Decks that do not refine and attachment decks whose polish converges without its fallbacks give identical output. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
After the rebase onto the deck-node channel mapping, the local refinement keeps every deck node (it only bisects deck elements), so the node channels still name deck nodes. The CHANGELOG and the troubleshooting note said they number the refined nodes; they now point to the node-channel section instead, which names both refinement kinds. Re-measured on the rebased build: the two headline decks take 10.0 s and 9.2 s with whole-line refinement and 0.33 s and 0.28 s now; the statics matrix CPU time of its 61 refining decks falls from 65 s to 33 s (the accuracy figures are unchanged). The lazy wave of the node-channel entry now refines to 269 elements instead of 1136, its node tensions within 0.9 N of the same line on 1560 elements. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
The active-tension test of a refined cable, merged from dev, assumed that static refinement splits every deck segment into the same number of cable elements. With local refinement the fairlead-side segment of the test deck becomes 2 of 100 elements, so the count check failed although the span was right. The test now checks that the span is the trailing elements that make up the 40/13 m segment and that it stops at that segment. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
|
@codex review |
Codex Review SummaryThis 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. Can't wait for the next one! 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". |
The local-refinement case at the element limit polishes a near-cable line (EI = 1e-2) on about 7000 elements. It converged in 106 Newton iterations on Windows but not within the cap of 120 on the Linux Release runner (residual 3.6). The case checks how the refinement levels are allocated at the limit, not the iteration count, so the cap is now 400, and the test prints the element count, the iterations and the residual of the solve. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! 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". |
The element-limit case of the local refinement needed a string-like line (EI = 1e-2) on about 7000 elements to reach the limit of 8192. Its polish has nearly free folding modes, so the equilibrium it settles on depends on round-off: Windows found the smooth one in 106 Newton iterations, while the Linux Release runner first ran past the cap and, with a larger cap, settled on a folded state that the kink check correctly rejected. CD_HermiteCable_Static_Solve_AutoMesh takes an optional max_elements, a lower element limit than 8192 (the default and every caller are unchanged). The case now refines 60 elements of 1.67 m with EI = 5 under a limit of 900: the bending-length rule asks for 16 children everywhere (960 elements), the elements about the sag keep their 16 by h*kappa and the rest take 8, giving 768 elements in 85 Newton iterations against a cap of 300. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
|
@codex review |
|
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". |
Summary
Finite-EI statics refine the mesh only where it is needed, and a lazy wave with discrete buoyancy modules in a cross current on a frictional seabed solves.
L0*kappaabove 0.7), or a fragile mesh underadaptive_mesh True, was refined as a whole: every element was split by the power of two the worst one needed, up to 16. A 462-element lazy wave whose 180 m top section had two elements was solved on 7392 elements in 10.0 s.A pass now splits into 2, 4, 8 or 16 only the elements that need it:
L0*kappaabove 0.12, or the stricteradaptive_meshtarget;sqrt(EI/T);It then grades the mesh so that no element is more than twice as long as the next.
The cap of 16 per deck element, the element limit, the acceptance checks and the fail-closed messages are unchanged. A refinement that stops short of its target names what stopped it.
The deck above now solves on 492 elements in 0.33 s, with end tensions within 4e-7 of the whole-line refinement.
In the statics matrix, 61 of 123 decks refine: CPU time falls from 65 s to 33 s, end tensions move by at most 0.21 % of the peak end tension, and nodes by at most 6.4e-4 of the line length.
Every deck node stays a node of the refined mesh, so the node output channels still name deck nodes.
Decks that do not refine, including every shipped example, give identical output.
tests/data/lazy_wave_touchdown_planar_refined_att.dat(25 modules) in a 0.3 m/s cross current failed at load fraction 0.125. The damped Newton update for the module drag overshot on the frictional seabed.CONTROLtest from feat(control): active tension of finite-EI cables; committed lengths under the force blend #26 assumed every deck segment splits into the same number of elements. It now checks that the controlled span is exactly the trailing elements of the 40/13 m fairlead-side segment (2 of 100 elements under local refinement).Tests
test_hermite_automesh: local against whole-line refinement (fewer elements, equilibrium within 1e-3 of the line length, rest length kept), power-of-two children within the cap, grading (at most 2x between neighbours), the end layer, the element limit, and a resolved mesh kept bit-identical; the elementh*kappametrics. The element-limit case uses the new optionalmax_elementsargument (a lower limit than 8192; callers unchanged) on a 60-element line, because reaching 8192 needed a string-like line whose polish settled on a platform-dependent folded state on Linux.attachment_cross_current: the four cross-current cases against their smeared twins.test_line_attachments: the fallback attachment verdicts (a slope jump beside a module accepted, a bend away from it rejected by the kink limit, compression undertensile_safety True);test_deck_hermite_cable: refinement keeps the declared element partition.pre-commit run --all-filesand the Sphinx build with-Wpass.Checklist
pre-commit run --all-filespassesctest --test-dir build --output-on-failurepassespython -m pytest tests python/testspasses (if Python or validation records changed)[Unreleased](heading added if missing) for user-visible changesdoc/updated for changed inputs, options, or outputsfeat:,fix:,docs:, ...)git commit -s) under theDeveloper Certificate of Origin