Dynamic loading of the boundaries in the finite-difference study of diffraction