|
FhSim
3.1.0
Marine systems simulation
|
| ID | 0028 |
| Class | TEST |
| Severity | 2 |
| Status | ready |
| Models | RbCable/RMCable, RbCable/RBCable, RbCable/6DofCable, RbCable/Cable, RbCable/Ring |
| Found | 2026-09-24 test-coverage audit of f42360e |
src/fhsim_marine_elements.cpp:17-21 registers all five:
None of the five classes overrides SimObject::HasJacobians() (it is only overridden by Disk, Sphere, Cable, CableBranched, CableConnector, NetStructure and TrawlBeam in this library), so each falls back to the engine's full finite-difference Jacobian. tests/CMakeLists.txt:1-11 builds no test file for any of the five, and no XML under tests/in/ names any of their registration strings. Three have a manual demo scenario under examples/input/ that is not part of CI or of any test: RigidBodyCable.xml (SimObject = "RbCable/RBCable"), C6DofCable.xml (SimObject = "RbCable/6DofCable") and Ring.xml (SimObject = "RbCable/Ring"). RMCable and CableRM (RbCable/RMCable and RbCable/Cable) have no XML anywhere in the repository that names them, manual or otherwise.
Five production SimObjects — the fixed planar chain (RMCable), the rigid-body cable, the 6-DoF cable, the RbCable/Cable variant and the ring connector — have no automated protection against a behavioural regression, a build break specific to their translation unit, or a future Jacobian added without a check. A change to shared code they depend on (e.g. InternalCable, sfh math helpers) can silently break any of them; nothing in CI would fail.
RBCable, Cable6Dof and Ring: copy the existing examples/input/RigidBodyCable.xml, C6DofCable.xml and Ring.xml scenarios (trimmed to a short simTime) into tests/in/<Name>/<Name>_in.xml and add a minimal RunTest-based smoke test per the pattern in tests/Disk_Test.cpp, asserting only that the run completes without error (Auto-mode Jacobian checking is a free side effect once any of them gains an analytic Jacobian, but none does today, so it is a no-op until then).RMCable and CableRM: no starting fixture exists; a new minimal XML scenario has to be authored first (parameters read from src/RMCable/RMCable.h / src/RMCable/Cable.h), then the same smoke test added.A new <Name>_Test.cpp per object, added to tests/CMakeLists.txt, that runs and passes for each of the five.
None to shipped code; this adds test-only files.
Partly done in af4a3d4. RBCable, Cable6Dof and Ring now have smoke tests (tests/RbCable_Test.cpp, fixtures tests/in/{RBCable,Cable6Dof,Ring}/, copies of the examples/input/ scenarios cut to TEnd = 1) that assert the run completes. Writing them exposed a real crash in Ring's destructor (MARE-0039, fixed). The Models column still lists the three because a smoke test is not the behavioural coverage this issue asks for.
Not done, and why: RbCable/RMCable and RbCable/Cable (CableRM) have no scenario anywhere in the repository. A fixture for them has to be authored from scratch, and for RbCable/Cable it is not yet clear which parameter set is the real interface (MARE-0025: the header documents the RBCABLE_CLASSIC_INTERFACE branch that no build compiles). Authoring a scenario from parameter names alone risks a fixture that runs but models nothing meaningful. Status stays ready: the work is test-only and needs no decision for RMCable; for CableRM it should follow MARE-0025.
RbCable/RMCable: done. RMCable_Smoke in tests/RbCable_Test.cpp runs a new fixture, tests/in/RMCable/RMCable_in.xml, authored from src/RMCable/RMCable.cpp: the object is a hard-coded planar chain of three unit masses and four unit links from the origin to the moving point (1.25 cos T, 3.5), with Alpha/Beta as Baumgarte gains. The initial positions satisfy all four link constraints at T = 0 (a zigzag), with zero velocities. The test asserts only that the run completes and every logged value is finite (ExpectFiniteOutput, now shared in tests/TestUtils.h). Over the one simulated second the totalLength output goes from 2.9e-10 to 1.2e-11, but it covers only links 1-3; link 4, to the moving end point, drifts by up to ~4 % because OdeFcn drops a term of the constraint acceleration (MARE-0047). The test does not check either. Since MARE-0047 was fixed (1b7d06a), the test also checks that link 4 keeps unit length to 2e-6.RbCable/Cable (CableRM): still open, waiting on MARE-0025 to settle which parameter set is the real interface before a fixture is authored.