On beams made of a phase-transforming material