Coating for thermoelasticity and for photoelasticity