Mpirun performs mesh generation

The example above moves the internal nodes based on the data in a dolfinx.fem.Function, which I assume is what you will have as input to your own problem. It doesn’t have any assumptions that would keep the exterior boundary fixed, that is just due to the specifics of the prescribed functions expr and expr2

If u is a solution from a elasticity probloem, you can simply pass that to perturb_mesh(u)

1 Like