Examples¶
libpgo includes several example simulations under the examples/ directory.
Basic API Test¶
Runs basic pypgo API calls including mesh loading and stiffness matrix computation.
Simulation Runner¶
Run a simulation from a JSON config:
Available examples:
| Example | Integrator | Description |
|---|---|---|
examples/box/ |
Newmark | Falling box |
examples/box-with-sphere/ |
Newmark | Box with sphere contact |
examples/dragon/ |
Backward Euler | Static dragon deformation |
examples/dragon-dyn/ |
Backward Euler | Dynamic dragon simulation |
examples/bunny/ |
Backward Euler | Bunny simulation |
Deterministic Mode¶
For reproducible run-to-run results:
Or set "deterministic": true in the simulation JSON config.
Alembic Export¶
Export simulation output to .abc files for Blender/Maya:
Cubic Mesh Generation¶
Generate a \(4 \times 4 \times 4\) cubic/hexahedral volumetric mesh: