Incremental Potential Contact#
Frictionless Incremental Potential Contact for small CPU simulations.
The collision geometry, barrier derivatives, and continuous collision detection come from the official IPC Toolkit. PyTorch supplies the tetrahedral elasticity and the implicit adjoint of the converged time step.
- class diffsim.ipc.IPCImplicitEulerSolver(dt=0.01, gravity=-9.8, damping=1.0, substeps=1, dhat=0.01, barrier_stiffness=100000.0, ground_height=None, newton_tolerance=1e-08, max_newton_iterations=50, max_line_search_iterations=25, armijo=0.0001, hessian_regularization=1e-09)[source]#
Bases:
objectDense, differentiable, frictionless IPC for small tetrahedral simulations.
Each substep minimizes the backward-Euler incremental potential containing inertia, Stable Neo-Hookean elasticity, and the official IPC barrier in one nonlinear solve. Every accepted Newton segment is limited by conservative CCD.
This solver is intentionally CPU-only and requires
torch.float64. It protects accepted trajectories from surface intersections and tetrahedral inversion (and optionally includes an analytic ground plane), but it does not implement friction.