Refactor element_on_physical_coordinates.