Numerical models in discontinuous media: Review of advances for rock mechanics applications