Interpolating results on an edge

Hi,

I am using dolfinx 0.4.1 installed from conda. I have a simulation performed in a 2d unit square geometry and I am wondering how to interpolate an expression only on the left edge. The simple thing to do is of course to use the approach demonstrated in this tutorial. But I am going to consider problems involving curved edges which will be easier to access through their tags. If this is possible, I will appreciate if someone could explain how or point me to an existing example.

Thanks a lot.

There is currently only very experimental support for interpolation onto sub entities (facets, edges, vertices).
However, you can use: dolfinx.mesh.compute_incident_entities to only interpolate onto cells containing a set of facets.
See the Documentation of compute_indicident_entities for the documentation of the input, or dolfinx/test_refinement.py at 621d1479adf1e1a8beb9eed86cc8ad3de963f223 · FEniCS/dolfinx · GitHub for an example (which computes the edges from a set of cells).
You can then pass the cells into u.interpolate as the second argument, ref: dolfinx.fem — DOLFINx 0.4.2.0 documentation

Thanks so much for the pointer!