Phase Transitions in Ferroelastic and Co-elastic Crystals