How to preserve stress field when deforming the mesh using ALE.move()

You need to use dolfinx.fem.Expression in the interpolation, see

and to move the mesh use

deformation_array = u.x.array.reshape((-1, mesh.geometry.dim))
    mesh.geometry.x[:, :mesh.geometry.dim] += deformation_array

as done in

1 Like