Calculation of correlation effects for grain-boundary and dislocation-pipe self-diffusion