The IMPETUS II code simulates the atomic mixing and particle emission that occurs when a solid is bombarded by energetic particles (as in SIMS or SNMS). The underlying model consists of a system of partial differential equations that are solved by a finite difference method (FDM). Special techniques are also employed to model thin layers and sharp interfaces, to deal efficiently with wide homogeneous layers (when the solution is tending to a steady state), to model linear diffusion in order to smooth the sharp interfaces before they enter to domain of the FDM. In this paper the special techniques are described in detail. Results from test problems, demonstrating these techniques, are shown. An algorithm that describes the way the IMPETUS II code is structured is given