IPC Contact¶
Overview¶
NovaPhy integrates libuipc to provide GPU-accelerated Incremental Potential Contact (IPC) with mathematically guaranteed penetration-free contact.
Optional Feature
IPC requires CUDA >= 12.4 and must be enabled at build time with NOVAPHY_WITH_IPC=ON.
How It Works¶
The IPC pipeline:
- Shape Conversion — NovaPhy shapes are converted to tetrahedral meshes
- GPU Newton Solver — libuipc solves the barrier-based contact problem on GPU
- Barrier Contact — Log-barrier potential guarantees no interpenetration
Build with IPC¶
# Initialize libuipc submodule
git submodule update --init --recursive
# Build with IPC
CMAKE_ARGS="--preset=ipc" pip install -e .
Usage¶
import novaphy
if novaphy.has_ipc():
builder = novaphy.ModelBuilder()
# ... add bodies and shapes ...
config = novaphy.IPCConfig()
config.dt = 1.0 / 60.0
ipc_world = novaphy.IPCWorld(builder.build(), config)
for _ in range(100):
ipc_world.step()
When to Use IPC¶
| Scenario | Recommended Solver |
|---|---|
| Real-time simulation | SolverSemiImplicit / SolverFeatherstone |
| Guaranteed no-penetration | IPCWorld |
| Deformable objects (future) | IPCWorld |
| Large-scale contact | IPCWorld |
Demo¶
Requirements¶
- CUDA >= 12.4
- Compatible C++ compiler (see Build Documentation)
- libuipc git submodule initialized