Skip to content

Share Newton barrier line-search step scaling#2943

Open
jslee02 wants to merge 1 commit into
mainfrom
simx/shared-newton-barrier-step-scale
Open

Share Newton barrier line-search step scaling#2943
jslee02 wants to merge 1 commit into
mainfrom
simx/shared-newton-barrier-step-scale

Conversation

@jslee02
Copy link
Copy Markdown
Member

@jslee02 jslee02 commented Jun 8, 2026

Summary

  • Share Newton-barrier line-search step-scale normalization in detail/newton_barrier.
  • Route rigid IPC Newton step scaling and deformable/world CCD limiters through the shared helper.
  • Keep line-search result payloads, limiting candidate identities, and zero-step diagnostics variant-local.

Motivation / Problem

  • PLAN-083 Phase 3 promotes only proven second-use solver contracts.
  • Rigid IPC and deformable/world CCD limiters already shared the same finite [0, 1] step-bound normalization shape, with deformable paths also stepping strictly inside the CCD bound before applying a candidate.
  • Sharing this narrow policy removes duplicated feasibility plumbing without promoting full projected-Newton status or line-search result semantics.

Changes / Key Changes

  • Added newton_barrier::makeLineSearchStepScale() for finite clamping plus optional safety scaling.
  • Added newton_barrier::makeInteriorLineSearchStepScale() for the strictly-inside CCD fraction used by deformable/world line searches.
  • Replaced duplicate rigid IPC and world-step local calculations with the shared helpers.
  • Added focused Newton-barrier primitive tests and updated the active PLAN-083 dev-task handoff evidence.

Testing

  • pixi run lint
  • pixi run -- cmake --build build/default/cpp/Release --target test_newton_barrier_primitives test_rigid_ipc_barrier test_world --parallel 8
  • pixi run -- ctest --test-dir build/default/cpp/Release --output-on-failure -R '^(test_newton_barrier_primitives|test_rigid_ipc_barrier|test_world)$'
  • pixi run build
  • pixi run test-unit
  • pixi run test-all
  • pixi run -e cuda test-all

Breaking Changes

  • None
  • Internal detail-only helper; no public API or migration required.

Related Issues / PRs (backports)


Checklist

  • Milestone set (DART 7.0 for main, DART 6.17.1 for release-6.17)
  • CHANGELOG.md updated if required (N/A: internal detail helper and dev-task evidence only)
  • Add unit tests for new functionality
  • Document new methods and classes (N/A: internal detail helper; dev-task evidence updated)
  • Add Python bindings (dartpy) if applicable (N/A)

@jslee02 jslee02 added this to the DART 7.0 milestone Jun 8, 2026
@jslee02
Copy link
Copy Markdown
Member Author

jslee02 commented Jun 8, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 8, 2026

Codecov Report

❌ Patch coverage is 96.29630% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 84.24%. Comparing base (481302f) to head (817e904).

Files with missing lines Patch % Lines
...t/simulation/detail/newton_barrier/line_search.hpp 93.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2943      +/-   ##
==========================================
+ Coverage   84.23%   84.24%   +0.01%     
==========================================
  Files         684      684              
  Lines       81088    81082       -6     
==========================================
+ Hits        68302    68306       +4     
+ Misses      12786    12776      -10     
Flag Coverage Δ
unittests 84.24% <96.29%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
dart/simulation/compute/world_step_stage.cpp 92.90% <100.00%> (+0.14%) ⬆️
dart/simulation/detail/rigid_ipc_barrier.cpp 94.18% <100.00%> (+0.06%) ⬆️
...t/simulation/detail/newton_barrier/line_search.hpp 96.96% <93.33%> (-3.04%) ⬇️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jslee02 jslee02 marked this pull request as ready for review June 8, 2026 07:31
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant