Computer simulation of threading dislocation density reduction in heteroepitaxial layers