Skip to content

Commit 7d89bd2

Browse files
committed
perf(multibody): full Newton for cables in the monolithic step
With OPTIONS modified_newton True every finite-EI cable reused its tangent within a step. A cable in the monolithic step of the multibody march is restored and stepped again from the same start at every coupling iteration, and there the reuse cost more than it saved: mixed_body_rods_points.dat ran in 7.0 s with the option against 5.8 s without (5.7-6.3 s with the cables alone kept on full Newton). Such a cable now keeps full Newton; the other solvers of the deck keep the option. The deck runs in 5.6 s with it. The documented trade-off of the option is measured again on the examples (one thread): 4-20 % faster on finite-EI cables, free-hanging or with a touchdown; 12 % slower on an EI = 0 cable laid on a frictional seabed in a current (a 600 s march), within a few per cent elsewhere on EI = 0 systems. The former "about 1.5 times slower on finite-EI lines on the seabed" no longer holds: the touchdown decks run 4-12 % faster with it. Results without the option are unchanged. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
1 parent 0b8eee3 commit 7d89bd2

3 files changed

Lines changed: 22 additions & 4 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ All notable changes to CableDyn are recorded in this file. The format follows
1818
The touchdown element now takes the reaction of its grounded stretch, from the grounded node
1919
to the touchdown point located from the two nodes' clearances: the error falls at the second
2020
order (2.1, 0.7, 0.2 N) and the outputs vary continuously.
21+
### Changed
22+
23+
- With `modified_newton True`, a finite-EI cable in the monolithic step of the multibody march
24+
keeps full Newton: it is stepped again from the same start at every coupling iteration, where
25+
reuse cost more than it saved (`mixed_body_rods_points.dat` with the option: 7.0 s, now 5.6 s).
26+
The documented speed trade-off of the option is measured again on the examples.
2127

2228
## [0.4.1] - 2026-11-08
2329

‎doc/options.rst‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -355,10 +355,14 @@ rejected as unknown. The dynamic Newton controls are set with ``dynamic_solver``
355355
- ``False``
356356
- ``True`` enables guarded within-step tangent reuse on every dynamic solver the deck builds.
357357
It does not relax convergence tolerances and should be qualified against full Newton.
358-
Measured against full Newton: 8-12 % faster on free-hanging finite-EI cables (lazy wave,
359-
buoyed cable), about 1.5 times slower on finite-EI lines on the seabed (contact fails the
360-
reuse contraction test and rebuilds the tangent), 3 % slower to 5 % faster on ``EI = 0``
361-
systems;
358+
Measured against full Newton on the example decks (one thread): 4 to 20 % faster on
359+
finite-EI cables, free-hanging or with a touchdown (lazy waves in waves, current and vessel
360+
motion, a buoyed cable, rods on a spar); 12 % slower on an ``EI = 0`` cable laid on a
361+
frictional seabed in a current, whose stick-slip friction makes a reused tangent take more
362+
iterations; within a few per cent elsewhere on ``EI = 0`` systems. A finite-EI cable in
363+
the monolithic step of the multibody march keeps full Newton, as it is stepped again from
364+
the same start at every coupling iteration (reuse there made ``mixed_body_rods_points.dat``
365+
7.0 s against 5.8 s);
362366
results move at the solver tolerance (Bergdahl mean cycle maxima within 0.16 %)
363367
- both
364368
- ``False modified_newton``

‎src/CableDyn_DeckDriver.f90‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22586,6 +22586,14 @@ SUBROUTINE write_multibody_dynamic_out(deck_path, out_root, channels, types, bod
2258622586
mb%cab_imp(c) = mb%cab_imp(c) .OR. attachment_moves(mb%cab_kind_b(c), mb%cab_obj_b(c))
2258722587
IF (mb%cab_imp(c)) mb%cables(c)%tol = MIN(mb%cables(c)%tol, CLAMPED_CABLE_TOL)
2258822588
END IF
22589+
! A cable in the monolithic step is restored and stepped again from the same start at every
22590+
! coupling iteration; within-step tangent reuse (OPTIONS modified_newton) made each of those
22591+
! steps dearer than a full Newton one (mixed_body_rods_points.dat: 7.0 s against 5.8 s), so
22592+
! such a cable keeps full Newton; the other solvers of the deck keep the option.
22593+
IF (mb%cab_imp(c) .AND. opts%dynamic_modified_newton) THEN
22594+
CALL CD_HFMF_Set_ModifiedNewton(mb%cables(c), .FALSE., ErrStat, ErrMsg)
22595+
IF (ErrStat /= CD_HFMF_OK) GOTO 900
22596+
END IF
2258922597
END DO
2259022598
ALLOCATE (mb%cable_points(2, SIZE(cab_lines)))
2259122599
DO c = 1, SIZE(cab_lines)

0 commit comments

Comments
 (0)