Understanding the fracture phenomena in inhomogeneous rock samples and ionic crystals, by monitoring the electromagnetic emission during their deformation