The theory of elastic inhomogeneities in electromagnetic materials