Element modification

Hi all,
Suppose I have a quadrilateral mesh like this:

I want to modify third element from the left by reducing its height as shown below:


How can I do it in code.

In legacy fenics you cannot.

In FEniCSx You can use DOLFINx_mpc for this, as it requires you to mesh that shrunken quadrilateral individually, and you can glue the solutions together with «periodic» boundary conditions.

Ref: GitHub - jorgensd/dolfinx_mpc: Extension for dolfinx to handle multi-point constraints.
Disclaimer: Im the author of dolfinx_mpc.

Thanks Sir.
If I replace those two coordinates from the mesh.coordinates() and create mesh from array like this.
How can I replicate it in Fenics.

Consider the demos of dolfinx_mpc; https://github.com/jorgensd/dolfinx_mpc/blob/main/python/demos/demo_periodic3d_topological.py
https://github.com/jorgensd/dolfinx_mpc/blob/main/python/demos/demo_elasticity_disconnect_2D.py