|
FhSim
3.1.0
Marine systems simulation
|
| ID | 0064 |
| Class | BUG |
| Severity | 2 |
| Status | blocked |
| Models | Net/NetStructure, Net/NetStructureArray, Net/NetStructureWakeEffect |
| Found | 2026-09-25, independent review of the MARE-0022 documentation (24f9aa9) |
| Decision needed | Approve the result-changing fix: compute the bottom contact into the buffer, or remove the port. |
m_bottomContact is zeroed in each constructor and only read afterwards:
src/net/NetStructure.cpp:45 zeroes it, :692 feeds it to the filter.src/net/NetStructureArray.cpp:50 and :888.src/net/NetStructureWakeEffect.cpp:44 and :724.No other line of the three classes writes it; AddBottomForces computes the seafloor force per node but does not store a sum.
The six-wide BottomContact output, registered by all three classes, is a filtered zero. A user who logs it to check whether the net touches the seafloor always reads "no contact". The pages now say so, but the port name promises otherwise.
m_bottomContact in AddBottomForces. The six components are not defined in the source and need the owner's definition.A one-node net resting on a flat seafloor: the output must be non-zero.
(a) changes the port's value; (b) breaks input files. Neither changes the net's dynamics.
Not fixed in the 2026-09-25 batch, though the result-changing fix was approved: fix (a) needs the meaning of the six components, and the source gives none. m_bottomContact is six wide in all five classes that have it (NetStructure, NetStructureArray, NetStructureWakeEffect, NetStructureWithConstraints and the uncompiled NetStructureOCL), is only ever zeroed, and no history in this repository writes it (git log -S finds only the Hungarian-notation rename). AddBottomForces computes per node the three components of CalcBottomForceSphere and nothing else. The owner needs to choose, for example:
Since MARE-0068, Net/NetStructureWakeEffect computes the seafloor forces as well, so (a) would apply to all three classes. AddBottomForces is const, so the sum needs a mutable buffer.