Hi,
Is there a way of efficiently getting the maximum of the egde lengths of the cells for use in UFL forms?
I am looking for something similar to h = CellSize(mesh)
. I noticed the functions MaxCellEdgeLength()
and MaxFacetEdgeLength()
exist. While the latter seems to work in surface integrals (i.e., assemble(MaxFacetEdgeLength(mesh)*v*ds)
), the cell version is not supported:
from dolfin import *
mesh = UnitSquareMesh(16, 16)
V = FunctionSpace(mesh, 'Lagrange', 1)
v = TestFunction(V)
hmax = MaxCellEdgeLength(mesh)
b = assemble(hmax*v*dx)
gives (version 2016.2)
Exception: This type of GeometricQuantity is not supported (yet).
Are there any other solutions, workarounds?
edit: MaxCellEdgeLength(mesh)
seems to work with FEniCS 2017.1.0.