Thermal cycling effect on a shape memory and piezoelectric heterostructure