Shortening the calculation time of photon dose distributions in an inhomogeneous medium.