Skip to content

Conversation

@zfergus
Copy link
Member

@zfergus zfergus commented Jul 22, 2025

Description

  • Implemented compute_normal and compute_normal_jacobian methods for various collision candidates

Type of change

  • Enhancement (non-breaking change which improves existing functionality)

How Has This Been Tested?

  • Added unit tests for normal computation in test_normals.cpp

- 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.
@zfergus zfergus requested a review from Copilot July 22, 2025 19:30
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 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_normal and compute_normal_jacobian methods to the base CollisionStencil class
  • 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

@codecov
Copy link

codecov bot commented Jul 22, 2025

Codecov Report

Attention: Patch coverage is 99.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 96.24%. Comparing base (6895dda) to head (2af11ce).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/ipc/candidates/collision_stencil.cpp 95.65% 1 Missing ⚠️
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     
Flag Coverage Δ
unittests 96.24% <99.00%> (-0.13%) ⬇️

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.

@zfergus zfergus merged commit dbb1ab4 into main Jul 22, 2025
17 checks passed
@zfergus zfergus deleted the compute-normals branch July 22, 2025 20:12
@zfergus zfergus added this to the v1.5.0 milestone Jul 30, 2025
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