Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Project-SEA-Stack/SEA-Stack
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: Project-SEA-Stack/SEA-Stack
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: salhus/linux-support-fixes
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 5 commits
  • 15 files changed
  • 1 contributor

Commits on Jun 10, 2026

  1. build(linux): prefer Chrono's bundled yaml-cpp and adapt to Chrono 10…

    … API
    
    Two small build fixes that together get SEA-Stack compiling cleanly on
    Linux against Chrono 10.0.0.
    
    * adapters/chrono/CMakeLists.txt — prefer Chrono::yaml-cpp over a
      system yaml-cpp when both are visible. Mixing Chrono's bundled
      yaml-cpp headers (from chrono_thirdparty/yaml-cpp/include) with
      a system libyaml-cpp.so triggers link errors against internal
      symbols such as YAML::FpToString and YAML::Emitter::Write.
    
    * apps/seastack/single_run.cpp — Chrono 10 moved the protected
      m_script_directory member of ChParserMbsYAML into an internal file
      handler; the script directory must now be set via
      m_file_handler.SetReferenceDirectory(dir).
    Salman Husain committed Jun 10, 2026
    Configuration menu
    Copy the full SHA
    a0d34cc View commit details
    Browse the repository at this point in the history
  2. fix(export): log joint reactions for all ChLink subclasses

    The generic joint reaction extraction in SimulationExporter::RecordStep
    was guarded by `dynamic_cast<ChLinkLock*>`, which silently fell through
    to an "all zeros" fallback for every other ChLink subclass -- including
    ChLinkUniversal (used by the 5SA articulated WEC demos), ChLinkRevolute,
    ChLinkRevoluteSpherical, and others.
    
    GetReaction1, GetReaction2, GetFrame1Abs, and GetFrame2Abs are virtual
    on ChLinkBase, so they resolve uniformly for any concrete joint type.
    Calling them on the base ChLink pointer fixes the export for all
    current and future joint types.
    
    Validation (5SA bimodal, 600s):
      Before:  joint_12..45  max |F| =       0.000 N for entire run
      After:   joint_12      max |F| =  192,471 N    max |T| =  158,075 N*m
               joint_23      max |F| =  211,687 N    max |T| =  220,279 N*m
               joint_34      max |F| =  201,941 N    max |T| =  311,303 N*m
               joint_45      max |F| =  169,830 N    max |T| =  401,657 N*m
      Internal consistency: reaction1_force == -reaction2_force to machine
      precision (Newton's third law).
    Salman Husain committed Jun 10, 2026
    Configuration menu
    Copy the full SHA
    4b12d7d View commit details
    Browse the repository at this point in the history
  3. fix(5sa/bimodal): add heave/pitch/yaw damping and frequency-domain ex…

    …citation
    
    The bimodal case had linear_damping = [0, 100000, 0, 500000, 0, 0]
    (zero linear damping in surge, heave, pitch, and yaw) and no quadratic
    damping at all. The bimodal swell + wind-sea spectrum contains energy
    near the chain's rigid-body heave natural frequency, and with no
    restoring damping in heave the mode integrated unboundedly: at
    t=198.86s body3 crossed 5 m/s, and by t=280s body z-positions exceeded
    +10 m above SWL with the entire 144-m chain out of the water.
    
    The fix mirrors the damping already present in the spreading case (a
    near-identical multi-body configuration that runs to completion):
    
      linear_damping:    [20000, 80000, 80000, 500000, 200000, 200000]
      quadratic_damping: [10000, 40000, 40000, 250000, 100000, 100000]
    
    It also adds an explicit `excitation: frequency_domain` block, again
    mirroring spreading. The bimodal swell and wind-sea have different
    headings, so excitation must be evaluated in the frequency domain --
    this is auto-selected by the loader when wave components span multiple
    headings, but stating it explicitly matches the parity with spreading
    and makes intent clear.
    
    Validation (run_seastack 600s, no MoorDyn):
      Before: body3 max |v| = diverged past 5.0 m/s at t=198.86s
              body3 max z   = +10.98 m at t=280s (chain in the air)
              run terminated at 280.7s
      After:  body3 max |v| = 3.92 m/s at t=592.99s (bounded)
              body3 max z   = within +/- 2 m throughout
              run completed full 600s, clean exit, 2m wallclock
    Salman Husain committed Jun 10, 2026
    Configuration menu
    Copy the full SHA
    f85e175 View commit details
    Browse the repository at this point in the history
  4. fix(gui/vsg): use opaque water surface to avoid runtime DepthSorted c…

    …rash
    
    When the animated water surface is added to the VSG scene graph after
    ChVisualSystemVSG::Initialize() -- which happens because the wave model
    is set up at runtime, not pre-bind -- Chrono's wrapIfTransparent helper
    wraps the new node in a vsg::DepthSorted set to bin 10 if the material
    opacity is less than 1.0. The first record traversal that encounters
    this node then segfaults inside vsg::Bin::add() because the bin and
    its pipeline state were not present when Initialize() finalized the
    view's render path.
    
    Stack at the crash:
      #0  vsg::Bin::add(State*, double, Node const*)
      #1  vsg::RecordTraversal::apply(MatrixTransform const&)
      #2  vsg::Group::traverse(RecordTraversal&)
       ...
      #N  chrono::vsg3d::ChVisualSystemVSG::Render()
    
    Water surface (kWaterOpacity=0.55) and wireframe overlay
    (SetOpacity(0.35)) both hit this. Setting both to 1.0 keeps the nodes
    out of the bin-10 DepthSorted path, so neither demos nor run_seastack
    crash on first render, including with the in-GUI wireframe toggle.
    
    Tradeoff: the water is opaque so submerged geometry is no longer
    visible through it. The proper fix is to compile any runtime-added
    transparent subtree against the live viewer (Chrono's ChShapeBuilderVSG
    owns an m_compileTraversal for this purpose but it is not exposed via
    SEA-Stack's public API surface). Tracking as a follow-up.
    Salman Husain committed Jun 10, 2026
    Configuration menu
    Copy the full SHA
    2172d0b View commit details
    Browse the repository at this point in the history
  5. chore(scripts): mark unix shell scripts as executable

    Each script under scripts/unix/ was checked in with mode 100644 (no
    executable bit), so `./scripts/unix/build.sh` fails on a fresh Linux
    clone. Setting +x on all of them makes the standard invocation pattern
    work as documented.
    Salman Husain committed Jun 10, 2026
    Configuration menu
    Copy the full SHA
    5c2b908 View commit details
    Browse the repository at this point in the history
Loading