Add function to clear sub-dofmap data to save memory.