Effective algorithm for two-dimensional frictional system involving arbitrary impacting boundaries. (1st February 2020)