Traditionally, one can calculate the update coefficients of the finite-difference time-domain algorithm at material interfaces by averaging the material properties of both sides, which leads to numerical inaccuracies of the reflection depending on the grid resolution. We propose a novel method to calculate the update coefficients such that the algorithm exactly fulfills the boundary conditions at a frequency of optimization, which allows a significant increase in grid spacing while limiting the numerical error. Using the proposed method, we reduced the computational expenses for the full-wave simulation of vertical-cavity surface-emitting lasers such that large structures can be treated without the need to exploit rotational symmetry. The method is demonstrated with the help of several examples.