Marking External Boundary Faces

Hello all!

I am simulating fluid flow through a rock with multiple materials. The 3D mesh, the subdomains, and the boundaries come from a MATLAB toolbox that generates this volumetric mesh.
The mesh that I have consist of a list of coordinates of the nodes, a list of tetrahedral mesh and a list of faces that lie inside the exterior boundary of this rock.

Following the code provided by dokken in
I generating the .xdmf file for the coordinates, elements, faces and its marked regions which consist of two subdomains (two materials) and three different boundaries(1_inlet, 2_outlet, 3_noslip).

I think that due to the fact that the face list that I am providing does not have all mesh faces but only the exterior ones the snipped code below should be changed in a way to consider that.

meshio.write("mf.xdmf", meshio.Mesh(points=msh.points, cells={"triangle": msh.cells["triangle"]},
                                    cell_data={"triangle": {"name_to_read": msh.cell_data["triangle"]["gmsh:physical"]}}))

mvc = MeshValueCollection("size_t", mesh, 2) 
with XDMFFile("mf.xdmf") as infile:, "name_to_read")

Until now I haven’t found a way to do it…
Many thanks in advance!

Rafael Ferrão