Label surfaces extracted from 3D tetrahedral mesh

I am interested in computing the surface area of labelled surfaces of a 3D volume. As a start, I extract the 2D surface using:
dolfinx.mesh.locate_entities_boundary(mesh3d, 2, np.isfinite(x[1]))
Separately, I have a list of vertices that is a subset of the surface vertices of the 3D volume. What I’d like to do is label any triangulation where all the triangulation vertices are a subset of this list. Once the surface is labelled, I can compute the surface area using ufl and dolfinx.

Perhaps the better question is: how do I access the 2D surface triangles from a 3D mesh in dolfinx? Otherwise, how do I achieve this labeling directly in dolfinx?

This gives you a list of entities (facets of your 3D mesh) whose vertices all satisfy the criterion in the last input.

The next step would be to create a MeshTags object with these (say give them corresponding values 3). Let’s call the mesh tags object ft.

This can be passed to ds=ufl.Measure("ds", domain=mesh3d, subdomain_data=ft)
and the surface area can be assembled with
dolfinx.fem.assemble_scalar(dolfinx.fem.form(1*ds(3)))