VBD / AVBD Solver¶
NovaPhy exposes Vertex Block Descent through the Newton-aligned solver-primary API:
import novaphy
# Add bodies, joints, shapes, or particles before finalizing.
builder = novaphy.ModelBuilder()
builder.color()
model = builder.finalize()
config = novaphy.solvers.SolverVBD.Config()
config.iterations = 10
solver = novaphy.solvers.SolverVBD(model, config)
state_in = model.state()
state_out = model.state()
control = model.control()
collision_pipeline = novaphy.CollisionPipeline(model)
contacts = collision_pipeline.contacts()
dt = 1.0 / 60.0
state_in.clear_forces()
collision_pipeline.collide(state_in, contacts)
solver.step(state_in, state_out, control, contacts, dt)
There is no VBDWorld container. SolverVBD consumes caller-owned
SimState, Control, and Contacts buffers like the rest of the solver
family.
Layout¶
The C++ implementation follows Newton's VBD solver split while using NovaPhy's upper-layer data interfaces:
| Module | Purpose |
|---|---|
dynamics/vbd/solver_vbd.h |
Public SolverVBD : SolverBase entry point |
src/dynamics/vbd/solver_vbd.cpp |
Step orchestration and backend reporting |
src/dynamics/vbd/rigid/ |
Rigid-body AVBD prediction, contact constraints, velocity recovery |
src/dynamics/vbd/soft/ |
Particle / soft-body VBD prediction and contact projection |
dynamics/vbd/vbd_types.h, vbd_solver_array.h |
Shared VBD types and solver-array helpers |
The SolverBase VBD path follows NovaPhy's solver-primary API. Backend selection
is explicit through VBDConfig.backend; CUDA execution requires both
NOVAPHY_WITH_VBD_CUDA=ON at build time and CUDA Model / SimState buffers.
Demos¶
VBD demos live under python/demos/vbd/ and use the Newton-style viewer
lifecycle: Example(viewer, args) with per-frame step() and render().
The rigid browser supports CPU and CUDA backends. The soft cloth browser and
large-scale rigid stress browser are CUDA-only and use CUDA Model / SimState
buffers directly.
Distance-spring scenes are omitted because SolverVBD::joint_support() does
not advertise distance joints.
| Demo | Newton analogue | Purpose |
|---|---|---|
vbd/demo_vbd_rigid.py |
VBD rigid scene browser | Contacts / supported joints |
vbd/demo_vbd_soft.py |
CUDA VBD soft scene browser | Cloth / rigid-soft contact |
Scene groups:
- contacts:
ground,dynamic_friction,static_friction,stack,stack_ratio,pyramid - joints:
rope,heavy_rope,bridge - soft:
cloth_hanging,rigid_soft_contact,cloth_twist
Examples: