Solutions of the heat conduction equation in multilayers for photothermal deflection experiments