Groups of cells in unstructured grid

See my answer here: Unstructured grid with different type of elements (triangle and lines) - #5 by Sagues