How to translate a 2D mesh by a vector?

You can displace the vertices of a mesh by a Function in a linear continuous VectorFunctionSpace by using the ALE.move() function, e.g.,

V = VectorFunctionSpace(mesh,"CG",1)
u = Function(V)

# (Set `u` to some desired nonzero vector field)

ALE.move(mesh,u)

where the vector field u has the interpretation of a displacement added to the initial mesh vertex positions.

3 Likes