Add cell diameter
Issue #164
resolved
Add CellDiameter
node to UFL and implement it as equal to MaxCellEdgeLength
for simplices and max(distance(v0, v1) for v0 in vertices(cell) for v1 in vertices(cell))
for non-simplices.
Comments (6)
-
reporter -
The proposed
max(distance(v0, v1) for v0 in vertices(cell) for v1 in vertices(cell))
formula is not quite correct for cells with bendy boundaries, and it is not quite clear what the correct calculation is. -
Firedrake users generally settle with
CellVolume(mesh)**(1/dim)
as an approximation forCellSize(mesh)
, although this sadly does not take into account aspect ratio of the cell. -
reporter I totally agree, @miklos1. We can raise a warning or an error for bendy cells. That's for discussion.
-
reporter - changed status to resolved
-
reporter Resolved by pull request #89. Merged at 9f6dbf5.
- Log in to comment
Opinions @martinal, @miklos1?