Sign of FacetNormal and CellNormal not consistent between parent and submesh

Let’s consider a 3D mesh created via mesh = create_box(MPI.COMM_WORLD, [np.array([0,0,0]), np.array([1,1,1])], [1,1,1], CellType.hexahedron, GhostMode.shared_facet) and a submesh of its surface derived via submesh = create_submesh(mesh, 2, all_boundary_facets)[0]. I need the sign of the surface normals of the parent mesh ufl.FacetNormal(msh) to be the same as for the derived mesh ufl.CellNormal(submesh). However, this is apparently not guaranteed.

The workaround I currently use to compare the signs between the meshes does its job but is highly inefficient. Maybe someone can point me into a good direction? No need for parallelization in my particular application.

Just in case anybody else might encounter the same issue, the task can be accomplished using the extract_surface filter provided by pyvista which preserves the surface normals.