Add cell diameter

Issue #164 resolved
Jan Blechta created an issue

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)

  1. Miklós Homolya

    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.

  2. Miklós Homolya

    Firedrake users generally settle with CellVolume(mesh)**(1/dim) as an approximation for CellSize(mesh), although this sadly does not take into account aspect ratio of the cell.

  3. Jan Blechta reporter

    I totally agree, @miklos1. We can raise a warning or an error for bendy cells. That's for discussion.

  4. Log in to comment