Generalization of the stress tensor to nonuniform fluids and solids and its relation to Saint-Venant's strain compatibility conditions.