Calculation of the temperature profile for laser treatment of metallic samples