  This article considers Hamiltonian mechanical systems with potential
functions admitting jump discontinuities. The focus is on accurate and
efficient numerical approximations of their solutions, which will be defined
via the laws of reflection and refraction. Despite of the success of symplectic
integrators for smooth mechanical systems, their construction for the
discontinuous ones is nontrivial, and numerical convergence order can be
impaired too. Several rather-usable numerical methods are proposed, including:
a first-order symplectic integrator for general problems, a third-order
symplectic integrator for problems with only one linear interface, arbitrarily
high-order reversible integrators for general problems (no longer symplectic),
and an adaptive time-stepping version of the previous high-order method.
Interestingly, whether symplecticity leads to favorable long time performance
is no longer clear due to discontinuity, as traditional Hamiltonian backward
error analysis does not apply any more. Therefore, at this stage, our
recommended default method is the last one. Various numerical evidence, on the
order of convergence, long time performance, momentum map conservation, and
consistency with the computationally-expensive penalty method, are supplied. A
complex problem, namely the Sauteed Mushroom, is also proposed and numerically
investigated, for which multiple bifurcations between trapped and ergodic
dynamics are observed.
