Get information about facet-connectivity of the mesh


I’ve got a quick question regarding getting information about the mesh connectivity in FEniCS 2019.1.
My problem is as follows: There are the following methods for a mesh available: mesh.coordinates and mesh.cells, which give the list of coordinates of the mesh vertices (mesh.coordinates) as well as the composition of the cells (triangles, tetrahedrons, etc.) with mesh.cells. See, e.g.,

from fenics import *

mesh = UnitSquareMesh(2, 2)
print(f"{mesh.coordinates() = }")
print(f"{mesh.cells() = }")

My question is: Is there any analogous functionality which gives a representation of the facets (e.g. line segments, triangles, etc.) of the mesh? And I need two things from this function: It should be fast (so no loops in python) and also possible to compute in parallel.

Thansk in advance for your help!

from dolfin import * 
mesh = UnitSquareMesh(10, 10)
mesh.init(mesh.topology().dim()-1, 0)
f_to_v = mesh.topology()(mesh.topology().dim()-1, 0)

where you for each facet can access the connectivity through f_to_v(index) or by using f_to_v() to get the flattened list for all facets.