Instead of callers hardcoding the heave equilibrium position, let force models
declare their static contribution via a new virtual hook:
NavalForceModel::applyStaticEquilibrium(Vector6& q)
RestoringForces overrides it to analytically solve for the heave equilibrium
(q[2] = wavesOriginPosition[2] - draft - netBuoyancy / hydro_rest[2][2]),
which eliminates the 4.9 MN heave impulse that previously coupled to surge
through off-diagonal added mass and damping terms.
NavalDomain::initialize() calls the hook for every registered model before
the first step, so any vessel added to the domain automatically starts at
the correct floating position — no per-caller configuration needed.
RigidBody6DOF::setState is promoted to public to support pre-simulation
state injection (previously only accessible to RK45Integrator via friend).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- NavalDomain.cpp: materialize BodyState temporaries before taking const& to
member (dangling-pointer= false positive on clang, real UB caught by gcc-12)
- TestBerthManeuverSystem.cpp: add GCC diagnostic pragma alongside existing
clang pragma to suppress deprecated-declarations on TugParametricForces
- TestWaveSpectrum.cpp: add missing #include <cmath> for std::sqrt
(transitively included on macOS/clang, required explicitly on gcc-12)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>