Description of heterogeneous solids in the framework of the gauge approach