# How to achieve dynamic mesh in getfem?

**URL:** <https://getfem.discourse.group/t/how-to-achieve-dynamic-mesh-in-getfem/72>\
**Category:** General\
**Created:** [March 28, 2025, 12:00am UTC](https://getfem.discourse.group/t/how-to-achieve-dynamic-mesh-in-getfem/72 "2025-03-28T00:00:01Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Konstantinos.Poulios](https://avatars.discourse-cdn.com/v4/letter/k/ac91a4/32.png) [@Konstantinos.Poulios](https://getfem.discourse.group/u/Konstantinos.Poulios)\
**Post date:** [April 1, 2025, 11:11am UTC](https://getfem.discourse.group/t/how-to-achieve-dynamic-mesh-in-getfem/72/2 "2025-04-01T11:11:33Z")

</div>

Currently because of a [bug](https://getfem.discourse.group/t/lost-consistency-after-updating-mesh-points/73) 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

```auto
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.

---

_[View the full topic](https://getfem.discourse.group/t/how-to-achieve-dynamic-mesh-in-getfem/72)._
