Avoid to check the geometry boundary

when the photon transports in the water with many voxels, i think that it is time-consuming when the particle across the boundary of two voxels. Maybe, there is no reaction on the boundary. how to avoid the situation that every step end point must be boundary when the particle across the boundary.