code: def deviator_stress(self):
          
          if not self.is_symmetric:
              raise warnings.warn("The stress tensor is not symmetric, "
                                  "so deviator stress will not be either")
          return self - self.mean_stress*np.eye(3)
docs: returns the deviatoric component of the stress