Ferroelastic crystals as heterogeneous and anisotropic materials with internal variables