Gradient-type modeling of the effects of plastic recovery and surface passivation in thin films