University of Pennsylvania, CIS 565: GPU Programming and Architecture, Final Project
- Gehan Zheng (LinkedIn, personal website), Hanting Xu
Click here for documentation (CIS5650 Final Project version)
This project is a CUDA-accelerated soft body simulation framework originally developed as a final project for CIS 5650: GPU Programming and Architecture at Upenn.
The goal of this project is to explore GPU-based physics simulation by building a lightweight, extensible simulation framework with minimal external dependencies. The system is designed to support rapid experimentation with different:
- physical models,
- numerical solvers,
- GPU-accelerated linear algebra pipelines.
-
Linear Solvers
- Sparse Cholesky Prefactorization W/ Approximate Minimum Degree Ordering
- Dense Cholesky Prefactorization
- Jacobi Solver (Naive)
- Cholesky Decomposition
- Preconditioned Conjugate Gradient
- Incomplete Cholesky Preconditioner
- Jacobi Preconditioner
-
FEM
- Projective Dynamics
- Direct (Cusolver's Cholesky)
- Chebyshev Acceleration
- Explicit Euler
- Incremental Potential Contact (IPC)
- Barrier
- Frictional Contact
- Dirichlet Boundary Conditions
- Equality Constraints
- Materials
- Corotational
- Neo-Hookean
- Projective Dynamics
-
Collision Detection
- Real-Time BVH Construction
- Continuous Collision Detection (CCD)
-
Operating System
- Windows
- Linux
-
CUDA Toolkit ≥ 12.0 (cublas, cusolver required)
-
CMake ≥ 3.18
-
OpenGL
The following libraries are included directly in the project:
- OpenGL
- ImGui
- GLFW
- Eigen
- spdlog
- Catch2
External tools:
The full runtime configuration is specified in context.json. This file defines simulation contexts, solver settings, and physical parameters.
The framework supports multiple simulation contexts, each representing an independent scene. A context may contain:
- one or more soft bodies,
- rigid bodies,
Each context can be configured independently with physical parameters such as time step size, gravity, damping coefficients. Contexts can be switched at runtime.
Solver behavior is controlled on a per-context basis.
-
Single-precision (
float)- Uses the Projective Dynamics (PD) solver
-
Double-precision (
double)- Uses the Incremental Potential Contact (IPC) solver
Only parameters relevant to the active solver are applied.
- The PD solver supports interactive object dragging.
- IPC is not recommended for scenes with a large number of degrees of freedom; for large vertex counts, careful parameter tuning is required, otherwise the simulation may fail to converge and pause.
- For large-scale systems, Cholesky-based solvers can become prohibitively slow; PCG with a Jacobi preconditioner is recommended instead.
- Linear solvers can be switched via ImGui before simulation starts.
