Skip to content

Commit 33e5dd3

Browse files
authored
Adhesion (#85)
Implement the adhesion potentials from "Augmented Incremental Potential Contact for Sticky Interactions" [Fang et al. 2023].
1 parent 9568030 commit 33e5dd3

File tree

177 files changed

+305605
-9764
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

177 files changed

+305605
-9764
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,7 @@ install_manifest.txt
487487
compile_commands.json
488488
CTestTestfile.cmake
489489
_deps
490+
CMakeUserPresets.json
490491

491492

492493
## Build

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ endif()
5959
project(IPCToolkit
6060
DESCRIPTION "A set of reusable functions to integrate IPC into an existing simulation."
6161
LANGUAGES CXX
62-
VERSION "1.3.1")
62+
VERSION "1.4.0")
6363

6464
option(IPC_TOOLKIT_BUILD_TESTS "Build unit-tests" ${IPC_TOOLKIT_TOPLEVEL_PROJECT})
6565
option(IPC_TOOLKIT_BUILD_PYTHON "Build Python bindings" OFF)

docs/source/cpp-api/adhesion.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Adhesion
2+
========
3+
4+
Normal Adhesion Potential
5+
-------------------------
6+
7+
.. doxygenfunction:: normal_adhesion_potential
8+
.. doxygenfunction:: normal_adhesion_potential_first_derivative
9+
.. doxygenfunction:: normal_adhesion_potential_second_derivative
10+
.. doxygenfunction:: max_normal_adhesion_force_magnitude
11+
12+
Tangential Adhesion Potential
13+
-----------------------------
14+
15+
.. doxygenfunction:: tangential_adhesion_f0
16+
.. doxygenfunction:: tangential_adhesion_f1
17+
.. doxygenfunction:: tangential_adhesion_f2
18+
.. doxygenfunction:: tangential_adhesion_f1_over_x
19+
.. doxygenfunction:: tangential_adhesion_f2_x_minus_f1_over_x3

docs/source/cpp-api/barrier.rst

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
Barrier
22
=======
33

4-
.. doxygenfunction:: ipc::barrier
5-
.. doxygenfunction:: ipc::barrier_first_derivative
6-
.. doxygenfunction:: ipc::barrier_second_derivative
4+
.. doxygenfunction:: barrier(const double, const double)
5+
.. doxygenfunction:: barrier_first_derivative
6+
.. doxygenfunction:: barrier_second_derivative
7+
8+
Barrier Force Magnitude
9+
-----------------------
10+
11+
.. doxygenfunction:: barrier_force_magnitude
12+
.. doxygenfunction:: barrier_force_magnitude_gradient
713

814
Adaptive Barrier Stiffness
915
--------------------------
@@ -15,8 +21,10 @@ Barrier Class
1521
-------------
1622

1723
.. doxygenclass:: ipc::Barrier
24+
:allow-dot-graphs:
1825

1926
Clamped Log Barrier
2027
~~~~~~~~~~~~~~~~~~~
2128

22-
.. doxygenclass:: ipc::ClampedLogBarrier
29+
.. doxygenclass:: ipc::ClampedLogBarrier
30+
:allow-dot-graphs:

docs/source/cpp-api/collisions.rst

Lines changed: 0 additions & 44 deletions
This file was deleted.

docs/source/cpp-api/friction.rst

Lines changed: 5 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,11 @@
11
Friction
22
========
33

4-
Friction Collisions
5-
-------------------
6-
7-
.. doxygenclass:: ipc::FrictionCollisions
8-
9-
Friction Collision
10-
^^^^^^^^^^^^^^^^^^
11-
12-
.. doxygenclass:: ipc::FrictionCollision
13-
14-
Vertex-Vertex Friction Collision
15-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16-
17-
.. doxygenclass:: ipc::VertexVertexFrictionCollision
18-
19-
Edge-Vertex Friction Collision
20-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21-
22-
.. doxygenclass:: ipc::EdgeVertexFrictionCollision
23-
24-
Edge-Edge Friction Collision
25-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26-
27-
.. doxygenclass:: ipc::EdgeEdgeFrictionCollision
28-
29-
Triangle-Vertex Friction Collision
30-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31-
32-
.. doxygenclass:: ipc::FaceVertexFrictionCollision
33-
344
Smooth Mollifier
355
----------------
366

37-
.. doxygenfunction:: f0_SF
38-
.. doxygenfunction:: f1_SF_over_x
39-
.. doxygenfunction:: df1_x_minus_f1_over_x3
40-
41-
Normal Force Magnitude
42-
----------------------
43-
44-
.. doxygenfunction:: ipc::compute_normal_force_magnitude
45-
.. doxygenfunction:: ipc::compute_normal_force_magnitude_gradient
46-
47-
Tangent Basis
48-
-------------
49-
50-
.. doxygenfunction:: ipc::point_point_tangent_basis
51-
.. doxygenfunction:: ipc::point_edge_tangent_basis
52-
.. doxygenfunction:: ipc::edge_edge_tangent_basis
53-
.. doxygenfunction:: ipc::point_triangle_tangent_basis
54-
55-
Tangent Basis Jacobians
56-
^^^^^^^^^^^^^^^^^^^^^^^
57-
58-
.. doxygenfunction:: ipc::point_point_tangent_basis_jacobian
59-
.. doxygenfunction:: ipc::point_edge_tangent_basis_jacobian
60-
.. doxygenfunction:: ipc::edge_edge_tangent_basis_jacobian
61-
.. doxygenfunction:: ipc::point_triangle_tangent_basis_jacobian
62-
63-
Relative Velocity
64-
-----------------
65-
66-
.. doxygenfunction:: ipc::point_point_relative_velocity
67-
.. doxygenfunction:: ipc::point_edge_relative_velocity
68-
.. doxygenfunction:: ipc::edge_edge_relative_velocity
69-
.. doxygenfunction:: ipc::point_triangle_relative_velocity
70-
71-
Relative Velocity as Multiplier Matricies
72-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
73-
74-
.. doxygenfunction:: ipc::point_point_relative_velocity_matrix
75-
.. doxygenfunction:: ipc::point_edge_relative_velocity_matrix
76-
.. doxygenfunction:: ipc::edge_edge_relative_velocity_matrix
77-
.. doxygenfunction:: ipc::point_triangle_relative_velocity_matrix
78-
79-
Relative Velocity Matrix Jacobians
80-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
81-
82-
.. doxygenfunction:: ipc::point_point_relative_velocity_matrix_jacobian
83-
.. doxygenfunction:: ipc::point_edge_relative_velocity_matrix_jacobian
84-
.. doxygenfunction:: ipc::edge_edge_relative_velocity_matrix_jacobian
85-
.. doxygenfunction:: ipc::point_triangle_relative_velocity_matrix_jacobian
7+
.. doxygenfunction:: smooth_friction_f0
8+
.. doxygenfunction:: smooth_friction_f1
9+
.. doxygenfunction:: smooth_friction_f2
10+
.. doxygenfunction:: smooth_friction_f1_over_x
11+
.. doxygenfunction:: smooth_friction_f2_x_minus_f1_over_x3
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
Normal Collisions
2+
=================
3+
4+
Normal Collisions
5+
-----------------
6+
7+
.. doxygenclass:: ipc::NormalCollisions
8+
:allow-dot-graphs:
9+
10+
Normal Collision
11+
----------------
12+
13+
.. doxygenclass:: ipc::NormalCollision
14+
:allow-dot-graphs:
15+
16+
Vertex-Vertex Normal Collision
17+
-----------------------------
18+
19+
.. doxygenclass:: ipc::VertexVertexNormalCollision
20+
:allow-dot-graphs:
21+
22+
Edge-Vertex Normal Collision
23+
-----------------------------
24+
25+
.. doxygenclass:: ipc::EdgeVertexNormalCollision
26+
:allow-dot-graphs:
27+
28+
Edge-Edge Normal Collision
29+
-----------------------------
30+
31+
.. doxygenclass:: ipc::EdgeEdgeNormalCollision
32+
:allow-dot-graphs:
33+
34+
Face-Vertex Normal Collision
35+
-----------------------------
36+
37+
.. doxygenclass:: ipc::FaceVertexNormalCollision
38+
:allow-dot-graphs:
39+
40+
Plane-Vertex Normal Collision
41+
-----------------------------
42+
43+
.. doxygenclass:: ipc::PlaneVertexNormalCollision
44+
:allow-dot-graphs:

docs/source/cpp-api/potentials.rst

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ Generic Potential
77
.. doxygenclass:: ipc::Potential
88
:allow-dot-graphs:
99

10-
Distance-based Potential
11-
------------------------
10+
Normal Potentials
11+
-----------------
1212

13-
.. doxygenclass:: ipc::DistanceBasedPotential
13+
.. doxygenclass:: ipc::NormalPotential
1414
:allow-dot-graphs:
1515

1616
Barrier Potential
@@ -19,8 +19,26 @@ Barrier Potential
1919
.. doxygenclass:: ipc::BarrierPotential
2020
:allow-dot-graphs:
2121

22+
Normal Adhesion Potential
23+
^^^^^^^^^^^^^^^^^^^^^^^^^
24+
25+
.. doxygenclass:: ipc::NormalAdhesionPotential
26+
:allow-dot-graphs:
27+
28+
Tangential Potentials
29+
---------------------
30+
31+
.. doxygenclass:: ipc::TangentialPotential
32+
:allow-dot-graphs:
33+
2234
Friction Potential
23-
------------------
35+
^^^^^^^^^^^^^^^^^^
2436

2537
.. doxygenclass:: ipc::FrictionPotential
38+
:allow-dot-graphs:
39+
40+
Tangential Adhesion Potential
41+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
42+
43+
.. doxygenclass:: ipc::TangentialAdhesionPotential
2644
:allow-dot-graphs:

docs/source/cpp-api/tangent.rst

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
Tangent
2+
=======
3+
4+
Tangent Basis
5+
-------------
6+
7+
.. doxygenfunction:: ipc::point_point_tangent_basis
8+
.. doxygenfunction:: ipc::point_edge_tangent_basis
9+
.. doxygenfunction:: ipc::edge_edge_tangent_basis
10+
.. doxygenfunction:: ipc::point_triangle_tangent_basis
11+
12+
Tangent Basis Jacobians
13+
^^^^^^^^^^^^^^^^^^^^^^^
14+
15+
.. doxygenfunction:: ipc::point_point_tangent_basis_jacobian
16+
.. doxygenfunction:: ipc::point_edge_tangent_basis_jacobian
17+
.. doxygenfunction:: ipc::edge_edge_tangent_basis_jacobian
18+
.. doxygenfunction:: ipc::point_triangle_tangent_basis_jacobian
19+
20+
Relative Velocity
21+
-----------------
22+
23+
.. doxygenfunction:: ipc::point_point_relative_velocity
24+
.. doxygenfunction:: ipc::point_edge_relative_velocity
25+
.. doxygenfunction:: ipc::edge_edge_relative_velocity
26+
.. doxygenfunction:: ipc::point_triangle_relative_velocity
27+
28+
Relative Velocity as Multiplier Matricies
29+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30+
31+
.. doxygenfunction:: ipc::point_point_relative_velocity_matrix
32+
.. doxygenfunction:: ipc::point_edge_relative_velocity_matrix
33+
.. doxygenfunction:: ipc::edge_edge_relative_velocity_matrix
34+
.. doxygenfunction:: ipc::point_triangle_relative_velocity_matrix
35+
36+
Relative Velocity Matrix Jacobians
37+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38+
39+
.. doxygenfunction:: ipc::point_point_relative_velocity_matrix_jacobian
40+
.. doxygenfunction:: ipc::point_edge_relative_velocity_matrix_jacobian
41+
.. doxygenfunction:: ipc::edge_edge_relative_velocity_matrix_jacobian
42+
.. doxygenfunction:: ipc::point_triangle_relative_velocity_matrix_jacobian
43+
44+
Closet Points
45+
-------------
46+
47+
.. doxygenfunction:: ipc::point_edge_closest_point
48+
.. doxygenfunction:: ipc::edge_edge_closest_point
49+
.. doxygenfunction:: ipc::point_triangle_closest_point
50+
51+
52+
Closet Points Jacobians
53+
^^^^^^^^^^^^^^^^^^^^^^^
54+
55+
.. doxygenfunction:: ipc::point_edge_closest_point_jacobian
56+
.. doxygenfunction:: ipc::edge_edge_closest_point_jacobian
57+
.. doxygenfunction:: ipc::point_triangle_closest_point_jacobian
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Tangential Collisions
2+
=====================
3+
4+
.. doxygenclass:: ipc::TangentialCollisions
5+
:allow-dot-graphs:
6+
7+
Tangential Collision
8+
--------------------
9+
10+
.. doxygenclass:: ipc::TangentialCollision
11+
:allow-dot-graphs:
12+
13+
Vertex-Vertex Tangential Collision
14+
----------------------------------
15+
16+
.. doxygenclass:: ipc::VertexVertexTangentialCollision
17+
:allow-dot-graphs:
18+
19+
Edge-Vertex Tangential Collision
20+
--------------------------------
21+
22+
.. doxygenclass:: ipc::EdgeVertexTangentialCollision
23+
:allow-dot-graphs:
24+
25+
Edge-Edge Tangential Collision
26+
------------------------------
27+
28+
.. doxygenclass:: ipc::EdgeEdgeTangentialCollision
29+
:allow-dot-graphs:
30+
31+
Face-Vertex Tangential Collision
32+
--------------------------------
33+
34+
.. doxygenclass:: ipc::FaceVertexTangentialCollision
35+
:allow-dot-graphs:

0 commit comments

Comments
 (0)