Incremental Potential Contact (IPC) enables robust, contact-rich simulation by casting elasticity and contact as a single energy minimization problem, but high-performance IPC pipelines are typically built from specialized kernels and assembly logic tied to fixed energies, primitive types, and parameterizations, making extensions costly and combinatorial. We present YASPS, a GPU-oriented framework that removes this extensibility bottleneck by making structure explicit in a differentiable intermediate representation. YASPS introduces two first-class relational operators: JOIN, which composes dependent quantities across user-declared relations (e.g., element-to-vertex connectivity), and UNION, which represents alternative parameterizations within a relation (e.g., mixing free vertices with affine-body or other parameterizations without fragmenting the program). Because JOIN and UNION are part of the symbolic program, YASPS differentiates through them using dedicated rules and an efficient second-order procedure that reuses intermediate Jacobians and reduces Hessian-projection cost. From the same relational description, YASPS derives the global gradient/Hessian sparsity and block layout, enabling structure-aware block-sparse storage and compression, and JIT-compiles CUDA kernels for evaluation, derivatives, assembly, and solving. Across IPC-style examples, including layered cloth-on-bunny, mixed rigid/deformable bunnies, and a caged deformation model, YASPS supports rapid front-end extensions with minimal back-end changes while achieving competitive end-to-end performance; its Hessian compression yields near 10x faster CG iterations in our benchmarks.
翻译:增量势接触(IPC)通过将弹性与接触建模为单一能量最小化问题,实现了鲁棒、高接触密度的仿真。然而,高性能IPC流水线通常由专用内核和装配逻辑构建,这些逻辑依赖于固定能量、基元类型及参数化方法,导致扩展成本高昂且呈组合爆炸式增长。本文提出YASPS——一种面向GPU的框架,通过将结构显式化表达为可微分中间表示,消除了这一可扩展性瓶颈。YASPS引入两类一阶关系算子:JOIN(连接)用于组合用户声明的跨关系依赖量(例如单元-顶点连接关系);UNION(联合)用于表示同一关系内的替代参数化方案(例如混合自由顶点与仿射体或其他参数化方式而无需割裂程序)。由于JOIN和UNION属于符号化程序的一部分,YASPS通过专用规则及高效二阶程序对其求导,该程序复用中间雅可比矩阵并降低黑塞矩阵投影开销。基于同一关系描述,YASPS可推导全局梯度/黑塞矩阵的稀疏性与块布局,实现结构感知的块稀疏存储与压缩,并即时编译CUDA内核用于求值、微分、装配与求解。在IPC风格实例中(包括分层布料-兔子接触、混合刚体/变形体兔子模型及笼式变形模型),YASPS支持以最小后端改动实现快速前端扩展,同时保持竞争性的端到端性能;其黑塞矩阵压缩在基准测试中实现了近10倍的CG迭代加速。