New contact resolution algorithm using two-stage contact definition and rounding scheme in 3D DDA