How to achieve dynamic mesh in getfem?

Currently because of a bug in the update of mesh dependencies you will need to rebuild your model from scratch with the deformed mesh.

You can create the new deformed mesh with a command like

m_new = gf.Mesh("clone", m_old)
m_new.set_pts(md.interpolation("u", m_old.pts(), m_old).reshape((-1,2)).T)

Alternatively you can setup your problem using an updated Lagrangian description, where the reference (stress free) configuration is defined by a field variable u_0 containing the mesh deformation.