Skip to content

Clean up closest point autogen#220

Open
zfergus wants to merge 2 commits intomainfrom
autogen-cleanup
Open

Clean up closest point autogen#220
zfergus wants to merge 2 commits intomainfrom
autogen-cleanup

Conversation

@zfergus
Copy link
Member

@zfergus zfergus commented Mar 5, 2026

Description

Clean up the closest point auto-generated code.

Copilot AI review requested due to automatic review settings March 5, 2026 03:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes redundant auto-generated closest-point derivative code from smooth_contact/distance and consolidates closest-point Hessian access through the ipc::tangent closest-point utilities, reducing duplicated generated sources.

Changes:

  • Replace direct calls to smooth_contact/distance autogen Hessians with edge_edge_closest_point_hessian() / point_triangle_closest_point_hessian() from ipc/tangent/closest_point.
  • Delete src/ipc/smooth_contact/distance/autogen.{hpp,cpp} and remove them from the distance CMake source list.
  • Update TinyAD include in autodiff_types.hpp to use TinyAD/Scalar.hh.

Reviewed changes

Copilot reviewed 6 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/ipc/utils/autodiff_types.hpp Switch TinyAD header include to Scalar.hh.
src/ipc/tangent/closest_point.hpp Add public Hessian APIs + expose corresponding autogen function declarations.
src/ipc/smooth_contact/distance/point_face.cpp Replace direct autogen Hessian calls with tangent closest-point Hessian API.
src/ipc/smooth_contact/distance/edge_edge.cpp Replace direct autogen Hessian calls with tangent closest-point Hessian API.
src/ipc/smooth_contact/distance/autogen.hpp Removed (duplicate generated declarations).
src/ipc/smooth_contact/distance/autogen.cpp Removed (duplicate generated implementation).
src/ipc/smooth_contact/distance/CMakeLists.txt Stop compiling removed autogen sources.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@codecov
Copy link

codecov bot commented Mar 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.19%. Comparing base (eba9e31) to head (9458ef8).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #220      +/-   ##
==========================================
+ Coverage   97.18%   97.19%   +0.01%     
==========================================
  Files         161      160       -1     
  Lines       24705    24798      +93     
  Branches      888      888              
==========================================
+ Hits        24009    24102      +93     
  Misses        696      696              
Flag Coverage Δ
unittests 97.19% <100.00%> (+0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

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.

2 participants