Dear Fenics community.
I am working on a variational formulation with a 3D mesh. In particular, I find myself calculating integrals on faces and accessing to local values like the MWE below.
from dolfin import *
mesh = UnitCubeMesh(1, 1, 1)
V = FunctionSpace(mesh, "DG", 0)
he = FacetArea(mesh)
w = TestFunction(V)
value = assemble(avg(he)*avg(w) * dS)
print(value.get_local())
I thought FacetArea(mesh)
would give me the diameter of the facet (triangles for this case). However, it gives me the areas of the faces. I would like to know if it is possible to define a symbolic function that evaluates to the facet diameter on each facet of the 3D mesh (similar to CellDiameter(mesh)
in 2D).
Thanks in advance!