C and Python examples from my book on using PETSc and Firedrake to solve...
Simulation framework for nonsmooth dynamical systems