Remove confusing CellSize and implement CellDiameter

Issue #924 resolved
Jan Blechta created an issue
def CellSize(mesh):
    """Return function cell size for given mesh."""
    return 2.0*ufl.Circumradius(_mesh2domain(mesh))

It is quite non-standard that circumdiameter is called "cell size", but more importantly notice useless docstring. The function has to be deprecated and removed. Can be replaced by 2*Circumradius in user codes, or we can eventually provide Circumdiameter.

On the other hand, a conventional cell size will be added as CellDiameter, and defined as set diameter of cell K given by \sup_{x,y \in K} \dist(x, y), can be implemented immediatelly as MaxCellEdgeLength for simplices but depends on https://bitbucket.org/fenics-project/ffc/issues/164 for quads/hexes.

Comments (3)

  1. Jan Blechta reporter

    Merge branch 'jan/feature-cell-diameter-2'

    Resolves #924.

    The name CellSize (which is equivalent to 2*Circumradius) is misleading. Standard "cell size" or "mesh size" quantity in FEM is a diameter \sup_{x,y\in K} |x-y| of cell K. This is implemented for simplices, quad/hexes as CellDiameter. It's tested by comparison to CellType.h() (which gives the same quantity and was implemented by #664) in

    test/unit/python/fem/test_symbolic_geometry_assembly.py:test_geometric_quantities
    

    Depends on:

    https://bitbucket.org/fenics-project/fiat/pull-requests/44
    https://bitbucket.org/fenics-project/ufl/pull-requests/81
    https://bitbucket.org/fenics-project/ffc/pull-requests/89
    

    → <<cset 8c5f2bf73a4f>>

  2. Log in to comment