Add normal computation and Jacobian methods for collision candidates#182
Add normal computation and Jacobian methods for collision candidates#182
Conversation
- Implemented compute_normal and compute_normal_jacobian methods for various collision candidates including VertexVertex, EdgeVertex, EdgeEdge, FaceVertex, and PlaneVertex. - Added unit tests for normal computation in test_normals.cpp. - Updated CMakeLists.txt to include the new test file.
There was a problem hiding this comment.
Pull Request Overview
This pull request adds normal computation and Jacobian methods for various collision candidates in an IPC (Incremental Potential Contact) library. The implementation provides standardized normal vector calculation capabilities across different collision stencil types.
Key Changes:
- Added
compute_normalandcompute_normal_jacobianmethods to the baseCollisionStencilclass - Implemented these methods for all collision candidate types (vertex-vertex, edge-vertex, edge-edge, face-vertex, and plane-vertex)
- Added comprehensive unit tests with finite difference validation for all collision types
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
src/ipc/candidates/collision_stencil.hpp |
Added public interface methods and protected virtual methods for normal computation |
src/ipc/candidates/collision_stencil.cpp |
Implemented base normal computation logic with normalization and optional flipping |
src/ipc/candidates/*.hpp |
Added protected method declarations for each collision candidate type |
src/ipc/candidates/*.cpp |
Implemented candidate-specific normal computation methods |
tests/src/tests/candidates/test_normals.cpp |
Added comprehensive unit tests for all collision types |
tests/src/tests/candidates/CMakeLists.txt |
Added new test file to build system |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…larity and consistency
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #182 +/- ##
==========================================
- Coverage 96.36% 96.24% -0.13%
==========================================
Files 103 104 +1
Lines 7878 7991 +113
==========================================
+ Hits 7592 7691 +99
- Misses 286 300 +14
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
compute_normalandcompute_normal_jacobianmethods for various collision candidatesType of change
How Has This Been Tested?
test_normals.cpp