The structure of grain boundaries described as a packing of polyhedra