Is there information about cell level during adaptation ?
I never found anything about cell levels. This would require some kind of mesh hierarchy concept which doesn't exist in fenics.
As a work-around for my project, I made an option restricting the minimum cell size. So I do roughly
def unmark_cells_exceeding_minimum_circumradius(mesh, refine, min_radius): for cell in fenics.cells(mesh): if not refine[cell]: continue if cell.circumradius() <= min_radius: refine[cell] = False return refine refine = fenics.CellFunction("bool", mesh) refine.set_all(False) refine = mark_cells_to_refine(refine, solution) refine = unmark_cells_exceeding_minimum_circumradius(mesh, refine, min_radius) mesh = fenics.refine(mesh, refine)