Flexible Mechanical Metamaterials: Solitary Waves and Phase Transitions