Extract normal vector data at boundary in dolfinx

ufl.FacetNormal is a symbolic expression. You cannot plot its values directly.

Until recently, one could only project the normal into a suitable space for visualization, or use it in symbolic formulations.

Now one can use dolfinx.fem.Expression to evaluate a normal at any point of a facet, see:

The noteable difference between legacy dolfin and dolfinx is that dolfinx supports curved cells, where there isn’t a single normal per facet.

4 Likes