newton.solvers#

Solvers are used to integrate the dynamics of a Newton model. The typical workflow is to construct a Model and a State object, then use a solver to advance the state forward in time via the step() method:

        ---
config:
  theme: forest
  themeVariables:
    lineColor: '#76b900'

---
flowchart LR
    subgraph Input["Input Data"]
        M[newton.Model]
        S[newton.State]
        C[newton.Control]
        K[newton.Contacts]
        DT[Time step dt]
    end

    STEP["solver.step()"]

    subgraph Output["Output Data"]
        SO["newton.State (updated)"]
    end

    %% Connections
    M --> STEP
    S --> STEP
    C --> STEP
    K --> STEP
    DT --> STEP
    STEP --> SO
    

Supported Features#

Solver

Integration

Rigid bodies

Articulations

Particles

Cloth

Soft bodies

SolverFeatherstone

Explicit

✅ generalized coordinates

🟨 no self-collision

SolverImplicitMPM

Implicit

SolverMuJoCo

Explicit, Semi-implicit, Implicit

✅ (uses its own collision pipeline from MuJoCo/mujoco_warp by default, unless use_mujoco_contacts is set to False)

✅ generalized coordinates

SolverSemiImplicit

Semi-implicit

✅ maximal coordinates

🟨 no self-collision

SolverStyle3D

Implicit

SolverVBD

Implicit

SolverXPBD

Implicit

✅ maximal coordinates

🟨 no self-collision

🟨 experimental

Classes

SolverBase

Generic base class for solvers.

SolverFeatherstone

A semi-implicit integrator using symplectic Euler that operates on reduced (also called generalized) coordinates to simulate articulated rigid body dynamics based on Featherstone's composite rigid body algorithm (CRBA).

SolverImplicitMPM

Implicit MPM solver.

SolverMuJoCo

This solver provides an interface to simulate physics using the MuJoCo physics engine, optimized with GPU acceleration through mujoco_warp.

SolverNotifyFlags

Flags indicating which parts of the model have been updated and require the solver to be notified.

SolverSemiImplicit

A semi-implicit integrator using symplectic Euler.

SolverStyle3D

Projective dynamic based cloth simulator.

SolverVBD

An implicit solver using Vertex Block Descent (VBD) for cloth simulation.

SolverXPBD

An implicit integrator using eXtended Position-Based Dynamics (XPBD) for rigid and soft body simulation.