You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/tutorial/getting_started.rst
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -372,12 +372,12 @@ where we define the operator :math:`\setminus_r: \mathcal{P}(\mathbb{R}^2) \time
372
372
373
373
with :math:`r \rightarrow0`.
374
374
375
-
We then define our surface discretization with a triangulated boundary mesh geometry. As in the smooth case, we can parameterize the domain across all polylines with :math:`u \in\tilde{M}` so that :math:`p(u): \tilde{M} \mapsto\mathbb{R}^3` traverses all material points, across all triangles :math:`t ∈ T` in the triangle mesh contiguously. The corresponding surface contact potential is then
375
+
We then define our surface discretization with a triangulated boundary mesh geometry. As in the smooth case, we can parameterize the domain across all triangles with :math:`u \in\tilde{M}` so that :math:`p(u): \tilde{M} \mapsto\mathbb{R}^3` traverses all material points, across all triangles :math:`t ∈ T` in the triangle mesh contiguously. The corresponding surface contact potential is then
376
376
377
377
.. math::
378
378
\frac{1}{2} \int_{u \in\tilde{M}} \max_{t \in T \backslash p(u)} b(d(p(u), t), \hat{d})~\mathrm{d} u,
379
379
380
-
where :math:`T \setminus p` is the set of boundary faces that do not contain the point p.
380
+
where :math:`T \setminus p` is the set of boundary faces that do not contain the point :math:`p`.
381
381
382
382
Applying mesh vertices as nodes (and quadrature points), we numerically integrate the surface contact potential. For each nodal position :math:`x \in V` we then have a corresponding material space coordinate :math:`\bar{x} \in\bar{V}`. Piecewise linear integration of the surface barrier is then
383
383
@@ -399,7 +399,9 @@ where :math:`V_{\text{int}} \subseteq V` is the subset of internal surface nodes
399
399
The corresponding discrete barrier potential is then simply
400
400
401
401
.. math::
402
-
P_s(V)= \frac{1}{2} \sum_{x \in V} w_x \Psi_s(x).
402
+
P_s(V)= \frac{1}{2} \sum_{x \in V} w_x \Psi_s(x),
403
+
404
+
where we simplify with :math:`w_x = w_{\bar{x}}` defined appropriately, per domain, as covered above.
403
405
404
406
Please, see the `paper <https://arxiv.org/abs/2307.15908>`_ for more details (including the formulation for 2D curves and edge-edge contact) and evaluation.
405
407
@@ -642,12 +644,13 @@ The ``Candidates`` class represents the culled set of candidate pairs and is bui
Possible values for ``broad_phase_method`` are: ``BRUTE_FORCE`` (parallel brute force culling), ``HASH_GRID`` (default), ``SPATIAL_HASH`` (implementation from the original IPC codebase), ``SWEEP_AND_TINIEST_QUEUE`` (method of :cite:t:`Belgrod2023Time`), or ``SWEEP_AND_TINIEST_QUEUE_GPU`` (requires CUDA).
647
+
Possible values for ``broad_phase_method`` are: ``BRUTE_FORCE`` (parallel brute force culling), ``HASH_GRID`` (default), ``SPATIAL_HASH`` (implementation from the original IPC codebase),
648
+
``BVH`` (`SimpleBVH <https://github.com/geometryprocessing/SimpleBVH>`_), ``SWEEP_AND_TINIEST_QUEUE`` (method of :cite:t:`Belgrod2023Time`), or ``SWEEP_AND_TINIEST_QUEUE_GPU`` (requires CUDA).
646
649
647
650
Narrow-Phase
648
651
^^^^^^^^^^^^
649
652
650
-
The narrow-phase computes the time of impact between two primitives (e.g., a point and a triangle or two edges in 3D). To do this we utilize the Tight Inclusion CCD method of :cite:t:`Wang2021TightInclusion` for the narrow phase as it is provably conservative (i.e., never misses collisions), accurate (i.e., rarely reports false positives), and efficient.
653
+
The narrowphase computes the time of impact between two primitives (e.g., a point and a triangle or two edges in 3D). To do this we utilize the Tight Inclusion CCD method of :cite:t:`Wang2021TightInclusion` for the narrow phase as it is provably conservative (i.e., never misses collisions), accurate (i.e., rarely reports false positives), and efficient.
651
654
652
655
The following example shows how to use the narrow phase to determine if a point is colliding with a triangle (static in this case).
Copy file name to clipboardExpand all lines: docs/source/tutorial/misc.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,7 @@ You can also set the log level:
66
66
Multi-threading
67
67
---------------
68
68
69
-
The IPC Toolkit utilizes `TBB<https://oneapi-src.github.io/oneTBB>`_ to enable multi-threading functionality. This is enabled by default, and significantly improves performance.
69
+
The IPC Toolkit utilizes `oneTBB<https://oneapi-src.github.io/oneTBB>`_ to enable multi-threading functionality. This is enabled by default, and significantly improves performance.
70
70
However, with multi-threading enabled, it is expected that the results can be non-deterministic because of rounding differences when adding numbers in different orders. To make the results deterministic you can limit TBB's maximum number of threads to one. The following code shows how to do this:
We can then map the displacements using ``collision_mesh.map_displacement(fe_displacements)`` or directly get the displaced proxy mesh vertices using ``collision_mesh.displace_vertices(fe_displacements)``. Similarly, we can map forces/gradients using ``collision_mesh.to_full_dof(contact_forces)`` or force jacobians/potential hessians using ``collision_mesh.to_full_dof(potential_hessian)``.
133
+
We can then map the displacements using ``collision_mesh.map_displacement(fe_displacements)`` or directly get the displaced proxy mesh vertices using ``collision_mesh.displace_vertices(fe_displacements)``. Similarly, we can map forces/gradients using ``collision_mesh.to_full_dof(contact_forces)`` or force Jacobians/potential Hessians using ``collision_mesh.to_full_dof(potential_hessian)``.
134
134
135
135
.. warning::
136
136
The function ``CollisionMesh::vertices(full_positions)`` should not be used in this case because the rest positions used to construct the ``CollisionMesh`` are not the same as the finite element mesh's rest positions. Instead, use ``CollisionMesh::displace_vertices(fe_displacements)`` where ``fe_displacements`` is already the solution of the PDE or can be computed as ``fe_displacements = fe_positions - fe_rest_positions`` from deformed and rest positions.
0 commit comments