This documentation claims that
The cells of the boundary mesh … are oriented to produce outward pointing normals …
but according to my experience they produce inward pointing normals. Here is a minimal example:
from dolfin import *
import matplotlib.pyplot as plt
import numpy as np
N = 5
mesh = UnitSquareMesh(N,N)
bm = BoundaryMesh(mesh,"exterior",False)
fig,ax = plt.subplots()
for i in range(bm.num_cells()):
cell = Cell(bm,i)
n = cell.cell_normal()
coords = cell.get_vertex_coordinates()
x,y = coords[::2], coords[1::2]
ax.plot(x,y,'k')
ax.quiver(np.mean(x),np.mean(y),n.x(),n.y(),scale=10)
plt.show()
I admit this is no big deal, but perhaps it might be of interest for some user.