A spatial damage energy distribution calculation for ion-implanted materials