Contact detection algorithms for three-dimensional ellipsoids in discrete element modelling