Nonlinear photothermal and photoacoustic processes for crack detection